初始化项目,由ModelHub XC社区提供模型

Model: emiluzelac/wardensight-1b
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-09-21 21:01:39 +08:00
commit 2d9d0c8c0a
11 changed files with 502149 additions and 0 deletions

35
.gitattributes vendored Normal file
View File

@@ -0,0 +1,35 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text

202
LICENSE Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

28
NOTICE Normal file
View File

@@ -0,0 +1,28 @@
WardenSight
Copyright 2026 Emil Uzelac
This product includes software and derives from work developed by third parties:
1. Antares-1B (fdtn-ai/antares-1b)
Cisco Systems, Inc. and its affiliates — Cisco Foundation AI.
Licensed under the Apache License, Version 2.0.
The base model, its agent protocol/prompts, and the vulnerability-localization
benchmark harness (harness/vloc-bench/, vendored here with local patches) originate
from this project. https://github.com/cisco-foundation-ai/vulnerability-localization-benchmark
2. IBM Granite 4.0
The base model architecture (granitemoehybrid) is IBM Granite 4.0. Apache-2.0.
3. Wordfence Intelligence vulnerability data
Benchmark ground truth is derived from the Wordfence Intelligence vulnerability
feed, licensed CC BY 4.0. https://www.wordfence.com/threat-intel/
Attribution: Wordfence / Defiant, Inc.
4. WordPress plugin source code
Plugin snapshots referenced by the benchmark are distributed under each plugin's
own license (typically GPLv2+), obtained from plugins.svn.wordpress.org and
downloads.wordpress.org. Snapshots are NOT redistributed in this repository.
Local modifications to harness/vloc-bench/ (auth headers, retry/backoff, path
normalization, commit-mode prompt, multi-turn tool_calls handling) are Apache-2.0,
Copyright 2026 Emil Uzelac, and are marked in-file where practical.

289
README.md Normal file
View File

@@ -0,0 +1,289 @@
---
base_model:
- fdtn-ai/antares-1b
language:
- en
library_name: transformers
license: apache-2.0
pipeline_tag: text-generation
tags:
- security
- vulnerability-localization
- agentic
- terminal-agent
- wordpress
- php
- granite
model-index:
- name: WardenSight-1B
results:
- task:
type: vulnerability-localization
name: Vulnerability file localization
dataset:
type: wp-vloc
name: WP-VLoc (1,646 held-out WordPress plugin tasks)
split: test
metrics:
- type: file-f1
value: 0.3263
name: File-F1
---
# **WardenSight-1B**
WardenSight-1B is a 1-billion parameter terminal agent specialized for **vulnerability
file localization in WordPress plugins**. It is built on
[Antares-1B](https://huggingface.co/fdtn-ai/antares-1b) (Cisco Foundation AI), itself
built on IBM Granite 4.0 1B, and adapts that general-purpose localizer to a single
ecosystem through supervised fine-tuning on vulnerability-localization trajectories
from security fixes in WordPress plugins.
Given a plugin repository and a CWE class, WardenSight explores the code through a
read-only terminal interface — issuing `grep`, `find`, `cat` and similar commands — and
submits a ranked list of files it believes contain that weakness. It runs entirely
on-premises at 1B parameters, so client code never leaves the machine.
On 1,646 held-out WordPress plugin tasks, WardenSight-1B achieves a File-F1 of **0.3263**
against the base model's **0.2671** — a **+22.2% relative improvement**, paired
bootstrap 95% CI **[+0.0378, +0.0797]**, P(better) = 1.00. It reaches that by being
more selective: it names **1.31 files per task** where the base model names 2.55.
WardenSight is a **triage instrument**. It tells an analyst which files to read first.
It does not produce line numbers, exploits, patches, or proof that code is vulnerable.
![WP-VLoc File-F1 comparison](assets/wp-vloc-file-f1.svg)
To our knowledge, WardenSight-1B is the first publicly released open-weight model
specialized and evaluated for vulnerability file localization in WordPress plugins.
## **Model Details**
| Attribute | Value |
|---|---|
| Parameters | 1B-class (`GraniteMoeHybridForCausalLM`) |
| Base | `fdtn-ai/antares-1b` |
| Task | CWE-conditioned, repository-level vulnerable-file ranking |
| Ecosystem | WordPress plugins (PHP) |
| Interface | Sandboxed terminal agent, raw completions API |
| Context | 16,384 tokens |
| License | Apache-2.0 |
| Release | July 2026 |
## **Intended Use**
### **Intended Use Cases**
WordPress plugin security review by authorized personnel, where a
vulnerability class is already known or suspected and the task is locating it. Typical
uses are triaging a disclosure, narrowing a code review, or prioritizing files for
manual audit.
### **Downstream Use**
The model emits standard tool calls and integrates into any agentic loop providing a
sandboxed read-only terminal. Reports are available in human-readable, JSON and SARIF
formats for ingestion by code-scanning platforms.
### **Out-of-Scope Use**
- **Determining that code is safe.** The model has no reliable ability to report the
absence of a vulnerability — see Limitations. Point it at clean code and it will
name a file anyway.
- **Autonomous remediation** or any workflow acting on output without human review.
- **Compliance evidence** or attestation of code security.
- **WordPress themes.** Every training and evaluation task is a **plugin** — no theme
appears anywhere in the 1,807 tasks used for this work. Themes are structurally
similar PHP and the model will run against one, but its accuracy there is entirely
unmeasured. Treat theme results as unvalidated.
- **Non-WordPress codebases.** Specialization was measured on WordPress plugin PHP
only; on other ecosystems use the general-purpose base model instead.
- **Offensive use.** The model localizes weaknesses for defensive review; it does not
generate exploits and must not be used to attack systems without authorization.
## **How to Get Started with the Model**
WardenSight is an agent model, not a one-shot text classifier. It needs three pieces:
the weights, a raw-completions model server, and the Antares CLI agent loop with the
WardenSight prompt adapter.
### 1. Download the weights
```bash
python -m pip install -U "huggingface_hub[cli]"
hf download emiluzelac/wardensight-1b --local-dir ./wardensight-1b
```
### 2. Serve with vLLM
Use the raw completions API — **not** chat completions, whose server-side templating
rewrites the tool prompt the model was trained on:
```bash
python -m pip install "vllm>=0.19,<0.20"
vllm serve ./wardensight-1b \
--served-model-name wardensight-1b \
--host 0.0.0.0 --port 8000 \
--dtype bfloat16 --max-model-len 16384 \
--trust-remote-code --generation-config vllm
```
### 3. Install the agent loop and WardenSight adapter
Install the **Antares CLI** distributed with
[`fdtn-ai/antares-1b`](https://huggingface.co/fdtn-ai/antares-1b/tree/main), then
apply the release's prompt adapter and profile:
```bash
hf download fdtn-ai/antares-1b assets/antares-cli.zip \
--local-dir ./antares-cli-source
unzip ./antares-cli-source/assets/antares-cli.zip -d ./antares-cli-source
python -m venv ~/antares-venv
~/antares-venv/bin/pip install ./antares-cli-source
git clone https://github.com/emiluzelac/wardensight-1b
cd wardensight-1b
bash tooling/install.sh ~/antares-venv
export ANTARES_ENDPOINT=http://127.0.0.1:8000/v1
~/antares-venv/bin/antares query ./some-wordpress-plugin \
--cwe CWE-79 --profile wardensight
```
For a version-pinned WordPress.org plugin, install `tooling/ws-scan` on your `PATH`
and run `wardensight plugin-slug@1.2.3 CWE-79`. It downloads and extracts the requested
plugin release before invoking the same agent loop. See
[`tooling/README.md`](https://github.com/emiluzelac/wardensight-1b/blob/main/tooling/README.md)
for installation details and the exact division between Cisco's CLI and the
WardenSight wrapper.
The adapter matters. WardenSight is fine-tuned on a three-tool contract
(`terminal`, `submit_vulnerable_files`, `submit_no_vulnerability_found`) with a
specific system message; the CLI's default adapter presents a fourth tool the model
has never seen, and under it the model degrades into repeated commands. The adapter,
profile and a convenience wrapper are in
[`wardensight-1b/tooling`](https://github.com/emiluzelac/wardensight-1b/tree/main/tooling).
Sampling settings used for every published number: temperature 0.3, frequency
penalty 0.3, 15 terminal calls, 2,048 max tokens, stop tokens
`["<|end_of_text|>", "<|start_of_role|>"]`.
## **Training and Evaluation**
### **Training Data**
584 agent trajectories over WordPress plugin repositories with known, fixed
vulnerabilities, drawn from [Wordfence Intelligence](https://www.wordfence.com/threat-intel/)
advisories (CC BY 4.0). Each trajectory explores a plugin snapshot taken at the last
vulnerable release and terminates in a file submission.
Ground truth is derived from **security-relevant diff hunks**, not whole release
diffs. This distinction is load-bearing: 58% of files in a typical WordPress
vulnerable→fix release diff contain no security change, and under whole-diff labels a
constant guess of `<slug>.php` scores 0.3428 and outranks every trained model. Labels
were rebuilt around CWE-aware hunks, which drops that control to 0.1041 and makes the
benchmark able to rank localizers at all.
Training plugins are disjoint at the plugin level from every evaluation set.
### **Training Setup**
Full fine-tune of `fdtn-ai/antares-1b`, no adapters or quantization.
| Training setting | Value |
|---|---|
| Method | Supervised fine-tuning on 584 localization trajectories |
| Training length | 2 epochs |
| Learning rate | 8e-6 |
| Maximum sequence length | 5,120 tokens |
| Numeric precision | bfloat16 |
| Training hardware | 1× ASUS Ascent GX10 (NVIDIA GB10, 128 GB unified memory) |
### **Evaluation**
Evaluated on **WP-VLoc**, a WordPress-specific benchmark built for this work: plugin
snapshots reconstructed at the pre-fix release, paired with security-hunk ground truth
files. Held-out plugins never appear in training. Scored by exact path-set File-F1
with a paired bootstrap (20,000 resamples) against the base model on identical tasks.
WardenSight-1B has not been evaluated on Cisco's separate 500-task, six-ecosystem
VLoc Bench, so its WP-VLoc score should not be inserted into that benchmark's
cross-model table.
| model | File-F1 | precision | recall | files named | n |
|---|---|---|---|---|---|
| **WardenSight-1B** | **0.3263** | **0.397** | 0.315 | **1.31** | 1,646 |
| Antares-1B (base) | 0.2671 | 0.289 | 0.330 | 2.55 | 1,646 |
| constant guess `<slug>.php` | 0.1041 | 0.132 | 0.094 | 1.00 | 1,646 |
| constant guess slug + `index.php` | 0.0816 | 0.074 | 0.104 | 2.00 | 1,646 |
Paired improvement **+0.0592 File-F1 (+22.2%)**, 95% CI [+0.0378, +0.0797],
P(better) = 1.00. Task level: 453 improved, 340 regressed, 853 unchanged; 5% trimmed
mean +0.0621, so the gain is not driven by outliers.
## **Safety Alignment**
This model operates as a component in a sandboxed agentic loop, not as a
conversational assistant, and no standalone safety alignment was performed on it.
Safety should be addressed at the system level:
- Run the agent inside an isolated sandbox (Docker with `network=none`)
- Restrict deployment to authorized security personnel
- Require human review of output before any remediation action
- Audit agent trajectories in high-risk workflows
Do not expose this model as a general-purpose assistant endpoint.
## **Limitations**
1. **It cannot report a clean repository.** On 500 already-patched snapshots it
declared a vulnerability present in every one (TNR 0.000), and its abstention rate
across all held-out evaluation is 0.000 — it has never declined to name a file.
This is a property of the model family rather than this checkpoint alone; the base
model scored TNR 0.006 on the same test. Use it only when a vulnerability is known
or strongly suspected to exist.
2. **Coverage is partial.** It places a correct file in its ranked output on ~41% of
held-out tasks. It is a filter that reorders analyst attention, not a detector that
finds everything — and it solves 76 tasks the base model misses while missing 90 the
base model solves.
3. **Terminal budget.** Performance degrades on large plugins where 15 commands cannot
cover the codebase, and on vulnerabilities spanning many files.
4. **Pattern dependence.** Strongest on weaknesses with grep-able signatures (XSS,
missing authorization); weaker where the flaw requires semantic reasoning about
behavior (unsafe deserialization, injection through indirect data flow).
5. **Ecosystem scope.** WordPress **plugins** only — 1,807 plugin tasks, no themes and
no non-WordPress code. Specialization was not measured beyond that and should not be
assumed to transfer.
6. **Knowledge cutoff.** Inherits the base model's April 2025 cutoff; training data
covers WordPress advisories through July 2026.
### **Recommendations**
Give it a plugin you already suspect and the correct CWE class — supplying the wrong
class produces unhelpful output rather than an admission that nothing was found. Pin
the plugin version when investigating a known advisory; scanning the current release
often re-finds files whose vulnerability shipped a fix. Read the ranked output as a
reading order, and confirm every finding in the source before acting on it.
## **Provenance**
The 584 training trajectories for this checkpoint were generated with **Claude Code**.
WardenSight-1B is a full fine-tune of `fdtn-ai/antares-1b`; Claude was the teacher
used to produce the WordPress localization demonstrations, not the student or base
model.
WardenSight-1B is not affiliated with or endorsed by Anthropic. The raw Claude
trajectories are not distributed with this release. Users are responsible for
evaluating any provider terms that may apply to downstream use of model-generated
training data.
## **Attribution and License**
| Component | Source and license |
|---|---|
| Base model | [`fdtn-ai/antares-1b`](https://huggingface.co/fdtn-ai/antares-1b) — Cisco Foundation AI, Apache-2.0 |
| Base architecture | IBM Granite 4.0 1B — `GraniteMoeHybridForCausalLM` |
| Evaluation harness | Cisco `vulnerability-localization-benchmark`, Apache-2.0, with local corrections to the command validator, path normalization and the true-negative scorer |
| Advisory data | [Wordfence Intelligence](https://www.wordfence.com/threat-intel/), CC BY 4.0 |
| Plugin code | each plugin's own license (GPL) |
Code and weights are released under Apache-2.0. See the Provenance section for the
training-data disclosure.

View File

@@ -0,0 +1,74 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="620" viewBox="0 0 1200 620" role="img" aria-labelledby="title desc">
<title id="title">WP-VLoc File-F1 benchmark results</title>
<desc id="desc">On 1,646 held-out WordPress plugin tasks, WardenSight-1B achieves 0.3263 exact path-set File-F1, compared with 0.2671 for stock Antares-1B, 0.1041 for a slug filename control, and 0.0816 for a slug plus index filename control. This is a 22.2 percent relative improvement over the base model.</desc>
<defs>
<linearGradient id="background" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#050a11"/>
<stop offset="1" stop-color="#0a1220"/>
</linearGradient>
<linearGradient id="wardenBar" x1="0" y1="0" x2="1" y2="0">
<stop offset="0" stop-color="#059669"/>
<stop offset="1" stop-color="#34d399"/>
</linearGradient>
<radialGradient id="glow" cx="0" cy="0" r="1" gradientTransform="translate(104 88) rotate(38) scale(360 280)">
<stop offset="0" stop-color="#00f5b4" stop-opacity=".11"/>
<stop offset="1" stop-color="#00f5b4" stop-opacity="0"/>
</radialGradient>
<filter id="barShadow" x="-8%" y="-70%" width="116%" height="240%">
<feDropShadow dx="0" dy="7" stdDeviation="8" flood-color="#000" flood-opacity=".3"/>
</filter>
</defs>
<rect x="1" y="1" width="1198" height="618" rx="28" fill="url(#background)" stroke="#1a293d" stroke-width="2"/>
<rect x="1" y="1" width="1198" height="618" rx="28" fill="url(#glow)"/>
<rect x="62" y="48" width="210" height="30" rx="15" fill="#071b19" stroke="#00f5b4" stroke-opacity=".7"/>
<circle cx="80" cy="63" r="4" fill="#00f5b4"/>
<text x="94" y="68" fill="#00f5b4" font-family="Inter,Segoe UI,Arial,sans-serif" font-size="13" font-weight="700" letter-spacing="1.2">BENCHMARK RESULTS</text>
<text x="62" y="124" fill="#ffffff" font-family="Inter,Segoe UI,Arial,sans-serif" font-size="32" font-weight="750">Vulnerability file localization in WordPress plugins</text>
<text x="62" y="158" fill="#8da0b5" font-family="Inter,Segoe UI,Arial,sans-serif" font-size="18">WP-VLoc · 1,646 held-out tasks · exact path-set File-F1</text>
<rect x="920" y="48" width="218" height="110" rx="18" fill="#071b19" stroke="#00f5b4" stroke-opacity=".42"/>
<path d="M946 119V84m0 0-10 10m10-10 10 10" fill="none" stroke="#00f5b4" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
<text x="974" y="91" fill="#8da0b5" font-family="Inter,Segoe UI,Arial,sans-serif" font-size="12" font-weight="700" letter-spacing="1.1">OVER BASE MODEL</text>
<text x="974" y="130" fill="#00f5b4" font-family="Inter,Segoe UI,Arial,sans-serif" font-size="34" font-weight="800">+22.2%</text>
<g stroke="#1a293d" stroke-width="1">
<line x1="333" y1="225" x2="333" y2="501"/>
<line x1="523" y1="225" x2="523" y2="501"/>
<line x1="713" y1="225" x2="713" y2="501"/>
<line x1="903" y1="225" x2="903" y2="501"/>
<line x1="1093" y1="225" x2="1093" y2="501"/>
</g>
<g font-family="Inter,Segoe UI,Arial,sans-serif">
<rect x="42" y="204" width="1096" height="72" rx="14" fill="#081a19" stroke="#00f5b4" stroke-opacity=".38"/>
<circle cx="67" cy="240" r="7" fill="#00f5b4"/>
<text x="84" y="246" fill="#ffffff" font-size="21" font-weight="750">WardenSight-1B</text>
<rect x="333" y="217" width="620" height="46" rx="9" fill="url(#wardenBar)" filter="url(#barShadow)"/>
<text x="970" y="248" fill="#66f2c5" font-size="23" font-weight="800">0.3263</text>
<text x="286" y="328" fill="#d8e0e8" font-size="20" text-anchor="end">Antares-1B</text>
<rect x="333" y="296" width="507" height="46" rx="9" fill="#526d88"/>
<text x="857" y="328" fill="#c7d4e0" font-size="22" font-weight="700">0.2671</text>
<text x="286" y="409" fill="#9aabba" font-size="18" text-anchor="end">Guess &lt;slug&gt;.php</text>
<rect x="333" y="377" width="198" height="46" rx="9" fill="#334356"/>
<text x="548" y="409" fill="#9fb0c1" font-size="21" font-weight="700">0.1041</text>
<text x="286" y="490" fill="#9aabba" font-size="18" text-anchor="end">Guess slug + index</text>
<rect x="333" y="458" width="155" height="46" rx="9" fill="#334356"/>
<text x="505" y="490" fill="#9fb0c1" font-size="21" font-weight="700">0.0816</text>
</g>
<line x1="333" y1="520" x2="1093" y2="520" stroke="#314154"/>
<g fill="#6f8297" font-family="Inter,Segoe UI,Arial,sans-serif" font-size="14" text-anchor="middle">
<text x="333" y="545">0.00</text>
<text x="523" y="545">0.10</text>
<text x="713" y="545">0.20</text>
<text x="903" y="545">0.30</text>
<text x="1093" y="545">0.40</text>
</g>
<text x="62" y="589" fill="#7f93a8" font-family="Inter,Segoe UI,Arial,sans-serif" font-size="14">Matched protocol and tasks · 20,000-sample paired bootstrap · higher is better</text>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

119
chat_template.jinja Normal file
View File

@@ -0,0 +1,119 @@
{%- set tools_system_message_prefix = 'You are a helpful assistant with access to the following tools. You may call one or more tools to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>' %}
{%- set tools_system_message_suffix = '\n</tools>\n\nFor each tool 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>. If a tool does not exist in the provided list of tools, notify the user that you do not have the ability to fulfill the request.' %}
{%- set documents_system_message_prefix = 'You are a helpful assistant with access to the following documents. You may use one or more documents to assist with the user query.\n\nYou are given a list of documents within <documents></documents> XML tags:\n<documents>' %}
{%- set documents_system_message_suffix = '\n</documents>\n\nWrite the response to the user\'s input by strictly aligning with the facts in the provided documents. If the information needed to answer the question is not available in the documents, inform the user that the question cannot be answered based on the available data.' %}
{%- set g4_default_system_message = 'You are a helpful assistant. Please ensure responses are professional, accurate, and safe.' %}
{%- if available_tools is defined and available_tools %}
{%- set tools = available_tools %}
{%- endif %}
{%- set ns = namespace(tools_system_message=tools_system_message_prefix,
documents_system_message=documents_system_message_prefix,
default_system_message=g4_default_system_message,
system_message=''
) %}
{%- if tools %}
{%- for tool in tools %}
{%- set ns.tools_system_message = ns.tools_system_message + '\n' + (tool | tojson) %}
{%- endfor %}
{%- set ns.tools_system_message = ns.tools_system_message + tools_system_message_suffix %}
{%- else %}
{%- set ns.tools_system_message = '' %}
{%- endif %}
{%- if documents %}
{%- for document in documents %}
{%- set ns.documents_system_message = ns.documents_system_message + '\n' + (document | tojson) %}
{%- endfor %}
{%- set ns.documents_system_message = ns.documents_system_message + documents_system_message_suffix %}
{%- else %}
{%- set ns.documents_system_message = '' %}
{%- endif %}
{%- if messages[0].role == 'system' %}
{%- if messages[0].content is string %}
{%- set ns.system_message = messages[0].content %}
{%- elif messages[0].content is iterable %}
{%- for entry in messages[0].content %}
{%- if entry.type== 'text' %}
{%- if ns.system_message != '' %}
{%- set ns.system_message = ns.system_message + '\n' %}
{%- endif %}
{%- set ns.system_message = ns.system_message + entry.text %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- if tools and documents %}
{%- set ns.system_message = ns.system_message + '\n\n' + ns.tools_system_message + '\n\n' + ns.documents_system_message %}
{%- elif tools %}
{%- set ns.system_message = ns.system_message + '\n\n' + ns.tools_system_message %}
{%- elif documents %}
{%- set ns.system_message = ns.system_message + '\n\n' + ns.documents_system_message %}
{%- endif %}
{%- else %}
{%- if tools and documents %}
{%- set ns.system_message = ns.tools_system_message + '\n\n' + ns.documents_system_message %}
{%- elif tools %}
{%- set ns.system_message = ns.tools_system_message %}
{%- elif documents %}
{%- set ns.system_message = ns.documents_system_message %}
{%- endif %}
{%- endif %}
{%- if ns.system_message %}
{{- '<|start_of_role|>system<|end_of_role|>' + ns.system_message + '<|end_of_text|>\n' }}
{%- else %}
{{- '<|start_of_role|>system<|end_of_role|>' + ns.default_system_message + '<|end_of_text|>\n' }}
{%- endif %}
{%- for message in messages %}
{%- set content = namespace(val='') %}
{%- if message.content is string %}
{%- set content.val = message.content %}
{%- else %}
{%- if message.content is iterable %}
{%- for entry in message.content %}
{%- if entry.type== 'text' %}
{%- if content.val != '' %}
{%- set content.val = content.val + '\n' %}
{%- endif %}
{%- set content.val = content.val + entry.text %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endif %}
{%- if (message.role == 'user') or (message.role == 'system' and not loop.first) %}
{{- '<|start_of_role|>' + message.role + '<|end_of_role|>' + content.val + '<|end_of_text|>\n' }}
{%- elif message.role == 'assistant' %}
{{- '<|start_of_role|>' + message.role + '<|end_of_role|>' + content.val }}
{%- if message.tool_calls %}
{%- for tool_call in message.tool_calls %}
{%- if (loop.first and content.val) or (not loop.first) %}
{{- '\n' }}
{%- endif %}
{%- if tool_call.function %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{%- if tool_call.arguments is string %}
{{- tool_call.arguments }}
{%- else %}
{{- tool_call.arguments | tojson }}
{%- endif %}
{{- '}\n</tool_call>' }}
{%- endfor %}
{%- endif %}
{{- '<|end_of_text|>\n' }}
{%- elif message.role == 'tool' %}
{%- if loop.first or (messages[loop.index0 - 1].role != 'tool') %}
{{- '<|start_of_role|>user<|end_of_role|>' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- content.val }}
{{- '\n</tool_response>' }}
{%- if loop.last or (messages[loop.index0 + 1].role != 'tool') %}
{{- '<|end_of_text|>\n' }}
{%- endif %}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|start_of_role|>assistant<|end_of_role|><think>
' }}
{%- endif %}

101
config.json Normal file
View File

@@ -0,0 +1,101 @@
{
"architectures": [
"GraniteMoeHybridForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"attention_multiplier": 0.0078125,
"bos_token_id": 100257,
"dtype": "bfloat16",
"embedding_multiplier": 12,
"eos_token_id": 100257,
"hidden_act": "silu",
"hidden_size": 2048,
"init_method": "mup",
"initializer_range": 0.1,
"intermediate_size": 4096,
"layer_types": [
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention",
"attention"
],
"logits_scaling": 8,
"mamba_chunk_size": 256,
"mamba_conv_bias": true,
"mamba_d_conv": 4,
"mamba_d_head": 32,
"mamba_d_state": 256,
"mamba_expand": 2,
"mamba_n_groups": 1,
"mamba_n_heads": 128,
"mamba_proj_bias": false,
"max_position_embeddings": 131072,
"model_type": "granitemoehybrid",
"normalization_function": "rmsnorm",
"num_attention_heads": 16,
"num_experts_per_tok": 0,
"num_hidden_layers": 40,
"num_key_value_heads": 4,
"num_local_experts": 0,
"output_router_logits": false,
"pad_token_id": 100256,
"position_embedding_type": "rope",
"residual_multiplier": 0.22,
"rms_norm_eps": 1e-05,
"rope_parameters": {
"rope_theta": 10000000,
"rope_type": "default"
},
"rope_theta": 10000000,
"router_aux_loss_coef": 0.01,
"shared_intermediate_size": 4096,
"tie_word_embeddings": true,
"time_step_limit": [
0.0,
{
"__float__": "Infinity"
}
],
"time_step_max": 0.1,
"time_step_min": 0.001,
"transformers_version": "5.4.0",
"use_cache": true,
"vocab_size": 100352
}

7
generation_config.json Normal file
View File

@@ -0,0 +1,7 @@
{
"_from_model_config": true,
"bos_token_id": 100257,
"eos_token_id": 100257,
"pad_token_id": 100256,
"transformers_version": "5.4.0"
}

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:070345c0f87a531dd8480cf1ec200f305f1caef1801e5ad26db47a213cb11f16
size 3263538464

501276
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

15
tokenizer_config.json Normal file
View File

@@ -0,0 +1,15 @@
{
"add_prefix_space": false,
"backend": "tokenizers",
"bos_token": "<|end_of_text|>",
"clean_up_tokenization_spaces": false,
"eos_token": "<|end_of_text|>",
"errors": "replace",
"is_local": true,
"local_files_only": false,
"model_max_length": 1000000000000000019884624838656,
"pad_token": "<|pad|>",
"padding_side": "left",
"tokenizer_class": "GPT2Tokenizer",
"unk_token": "<|unk|>"
}