wev-ai 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wev-ai might be problematic. Click here for more details.
- wev_ai-0.1.0/LICENSE +202 -0
- wev_ai-0.1.0/NOTICE +44 -0
- wev_ai-0.1.0/PKG-INFO +297 -0
- wev_ai-0.1.0/README.md +261 -0
- wev_ai-0.1.0/pyproject.toml +43 -0
- wev_ai-0.1.0/setup.cfg +4 -0
- wev_ai-0.1.0/wev/__init__.py +4 -0
- wev_ai-0.1.0/wev/api.py +130 -0
- wev_ai-0.1.0/wev/cli.py +18 -0
- wev_ai-0.1.0/wev/data.py +87 -0
- wev_ai-0.1.0/wev/evaluate.py +105 -0
- wev_ai-0.1.0/wev/export.py +73 -0
- wev_ai-0.1.0/wev/external.py +129 -0
- wev_ai-0.1.0/wev/general.py +88 -0
- wev_ai-0.1.0/wev/inference.py +148 -0
- wev_ai-0.1.0/wev/mind2web.py +343 -0
- wev_ai-0.1.0/wev/model.py +229 -0
- wev_ai-0.1.0/wev/nnetnav.py +295 -0
- wev_ai-0.1.0/wev/prompts.py +41 -0
- wev_ai-0.1.0/wev/serve.py +73 -0
- wev_ai-0.1.0/wev/train.py +195 -0
- wev_ai-0.1.0/wev_ai.egg-info/PKG-INFO +297 -0
- wev_ai-0.1.0/wev_ai.egg-info/SOURCES.txt +25 -0
- wev_ai-0.1.0/wev_ai.egg-info/dependency_links.txt +1 -0
- wev_ai-0.1.0/wev_ai.egg-info/entry_points.txt +2 -0
- wev_ai-0.1.0/wev_ai.egg-info/requires.txt +20 -0
- wev_ai-0.1.0/wev_ai.egg-info/top_level.txt +1 -0
wev_ai-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Jared Palmer
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
wev_ai-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
wev
|
|
2
|
+
Copyright 2026 the wev authors
|
|
3
|
+
|
|
4
|
+
This product includes software adapted from kev
|
|
5
|
+
(https://github.com/jaredpalmer/kev), licensed under the Apache License 2.0:
|
|
6
|
+
- wev/model.py: sequence packing with reserved Qwen delimiter tokens,
|
|
7
|
+
unforgeable option boundaries, block-causal branch mask with per-branch
|
|
8
|
+
position restart, pointer readout head.
|
|
9
|
+
- wev/api.py: System One request/response shapes and rendering.
|
|
10
|
+
|
|
11
|
+
wev/prompts.py contains instruction text copied from jev-ultrafast
|
|
12
|
+
(https://github.com/browser-use/jev-ultrafast), used under the MIT License:
|
|
13
|
+
|
|
14
|
+
MIT License
|
|
15
|
+
Copyright (c) 2026 Browser Use
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
in the Software without restriction, including without limitation the rights
|
|
20
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
furnished to do so, subject to the following conditions:
|
|
23
|
+
|
|
24
|
+
The above copyright notice and this permission notice shall be included in all
|
|
25
|
+
copies or substantial portions of the Software.
|
|
26
|
+
|
|
27
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
+
SOFTWARE.
|
|
34
|
+
|
|
35
|
+
Training data is derived from Mind2Web (https://huggingface.co/datasets/osunlp/Mind2Web),
|
|
36
|
+
licensed CC BY 4.0: Deng et al., "Mind2Web: Towards a Generalist Agent for the Web", NeurIPS 2023
|
|
37
|
+
(arXiv:2306.06070). Converted requests are a modified form of the original data.
|
|
38
|
+
|
|
39
|
+
Training data is also derived from NNetNav (https://huggingface.co/datasets/stanfordnlp/nnetnav-live),
|
|
40
|
+
licensed Apache-2.0: Murty et al., "NNetNav: Unsupervised Learning of Browser Agents Through Environment
|
|
41
|
+
Interaction in the Wild" (arXiv:2410.02907).
|
|
42
|
+
|
|
43
|
+
wev is not affiliated with or endorsed by TypeSafe AI. "Jev" and "System One" are referenced only to describe
|
|
44
|
+
API compatibility.
|
wev_ai-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wev-ai
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local System-One decision model: typed questions in, calibrated probabilities out, one forward pass. General decisions and browser-agent steps; drop-in POST /v1/systemone.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/alanhuangyoo/wev
|
|
7
|
+
Project-URL: Models, https://huggingface.co/alanhuangya
|
|
8
|
+
Project-URL: Issues, https://github.com/alanhuangyoo/wev/issues
|
|
9
|
+
Keywords: decision-model,system-one,browser-agent,llm,lora,qwen,calibration
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Requires-Python: <3.14,>=3.11
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
License-File: NOTICE
|
|
18
|
+
Requires-Dist: torch>=2.8
|
|
19
|
+
Requires-Dist: transformers<5,>=4.56
|
|
20
|
+
Requires-Dist: peft>=0.15
|
|
21
|
+
Requires-Dist: pydantic>=2
|
|
22
|
+
Requires-Dist: numpy
|
|
23
|
+
Requires-Dist: safetensors
|
|
24
|
+
Requires-Dist: huggingface_hub
|
|
25
|
+
Provides-Extra: serve
|
|
26
|
+
Requires-Dist: fastapi; extra == "serve"
|
|
27
|
+
Requires-Dist: uvicorn; extra == "serve"
|
|
28
|
+
Provides-Extra: train
|
|
29
|
+
Requires-Dist: datasets>=3.0; extra == "train"
|
|
30
|
+
Requires-Dist: lxml>=5; extra == "train"
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest; extra == "dev"
|
|
33
|
+
Requires-Dist: datasets>=3.0; extra == "dev"
|
|
34
|
+
Requires-Dist: lxml>=5; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
<div align="center">
|
|
38
|
+
|
|
39
|
+
# wev
|
|
40
|
+
|
|
41
|
+
**Local System-One decision models for agents.**<br>
|
|
42
|
+
Typed questions in, calibrated probabilities out, in one forward pass. No text generation, no API key.
|
|
43
|
+
|
|
44
|
+
[](https://huggingface.co/collections/alanhuangya/wev-6ab4eb5d872c9ae9fd68faa6)
|
|
45
|
+
[](https://huggingface.co/datasets/alanhuangya/wev-data)
|
|
46
|
+
[](https://pypi.org/project/wev-ai/)
|
|
47
|
+
[](https://github.com/alanhuangyoo/wev/blob/main/paper/icml/main.pdf)
|
|
48
|
+
[](https://github.com/alanhuangyoo/wev/blob/main/LICENSE)
|
|
49
|
+
|
|
50
|
+
[Quickstart](#quickstart) · [Results](#results) · [How it works](#how-it-works) · [Train your own](#train-your-own) · [Citation](#citation)
|
|
51
|
+
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<img src="https://raw.githubusercontent.com/alanhuangyoo/wev/main/assets/overview.png" width="88%" alt="Interface distillation: a browser agent's typed requests are answered by a teacher LLM on live websites, an LLM judge keeps the verified episodes, and the wev decision model trained on them serves the same interface locally.">
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
`wev` answers the `POST /v1/systemone` request shape: a free-form state plus any number of questions, each a
|
|
59
|
+
**choice**, a **yes/no** or a **score**. It handles general decisions such as triage, routing, policy checks and
|
|
60
|
+
agent monitoring, and it handles browser-agent steps: *which operation?* and *which element?* It runs on your own
|
|
61
|
+
GPU, or on a laptop.
|
|
62
|
+
|
|
63
|
+
## Highlights
|
|
64
|
+
|
|
65
|
+
- 🌐 **Browser steps on unseen websites: 76% right**, where open decision models trained on general data reach at
|
|
66
|
+
most 21%.
|
|
67
|
+
- 🧠 **General decisions stay strong.** wev beats Laya on every general benchmark, and wev-8b is level with Kev-8B out
|
|
68
|
+
of domain.
|
|
69
|
+
- 🎓 **As good as its teacher, locally.** As the System One of an open browser agent, wev completes as many live
|
|
70
|
+
tasks as the LLM it was distilled from.
|
|
71
|
+
- ⚡ **Fast.** 10–37 ms for a general decision and 91–322 ms for a full browser page on one RTX 5090; 77 ms on a
|
|
72
|
+
laptop.
|
|
73
|
+
- 📏 **Calibrated.** Probabilities you can threshold: raise the bar for DONE and early stops drop from 8.5% to 3.8%.
|
|
74
|
+
|
|
75
|
+
## Models
|
|
76
|
+
|
|
77
|
+
| Model | Size | Best for | General decision | Browser step |
|
|
78
|
+
|---|---|---|---|---|
|
|
79
|
+
| [**wev-4b**](https://huggingface.co/alanhuangya/wev-4b) | 8.1 GB | the default: one consumer GPU, best on live websites | 15 ms | 217 ms |
|
|
80
|
+
| [wev-8b](https://huggingface.co/alanhuangya/wev-8b) | 15.2 GB | the most accurate out of domain | 21 ms | 322 ms |
|
|
81
|
+
| [wev-1.7b](https://huggingface.co/alanhuangya/wev-1.7b) | 3.5 GB | laptops and small GPUs; the fastest | 10 ms | 91 ms |
|
|
82
|
+
|
|
83
|
+
*Median latency on one RTX 5090 (bf16), one request at a time.*
|
|
84
|
+
|
|
85
|
+
## Quickstart
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pip install "wev-ai[serve]"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
import wev
|
|
93
|
+
|
|
94
|
+
m = wev.load("alanhuangya/wev-4b") # downloads once from the Hugging Face Hub
|
|
95
|
+
out = m.predict(
|
|
96
|
+
state="Refund request: order #4411 arrived damaged, customer attached photos, first refund this year.",
|
|
97
|
+
questions={
|
|
98
|
+
"action": {"type": "choice", "instructions": "What should support do?",
|
|
99
|
+
"criteria": {"refund": "Refund the order.", "replace": "Ship a replacement.",
|
|
100
|
+
"escalate": "Send to a human agent."}},
|
|
101
|
+
"fraud_risk": {"type": "noul", "instructions": "This request looks fraudulent.",
|
|
102
|
+
"criteria": {"true": "Likely fraud.", "false": "No sign of fraud."}},
|
|
103
|
+
},
|
|
104
|
+
)
|
|
105
|
+
out["answers"]
|
|
106
|
+
# {'action': {'type': 'choice', 'choice': 'replace', 'probabilities': {'refund': 0.38, 'replace': 0.51, ...}},
|
|
107
|
+
# 'fraud_risk': {'type': 'noul', 'noul': 0.02}}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Serve it over HTTP** with the same request and response shapes as a System One API:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
wev serve --model alanhuangya/wev-4b --port 8009
|
|
114
|
+
curl -s localhost:8009/v1/systemone -H 'content-type: application/json' -d '{"state": "...", "questions": {...}}'
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Use it in a browser agent.** An agent written for a System One API, such as
|
|
118
|
+
[jev-ultrafast](https://github.com/browser-use/jev-ultrafast), can call `http://127.0.0.1:8009/v1/systemone`
|
|
119
|
+
instead of the hosted endpoint. jev-ultrafast hard-codes that URL in `jev_ultrafast/model.py` (`SYSTEM_ONE_URL`), so
|
|
120
|
+
change that one line.
|
|
121
|
+
|
|
122
|
+
## Results
|
|
123
|
+
|
|
124
|
+
<p align="center"><img src="https://raw.githubusercontent.com/alanhuangyoo/wev/main/assets/teaser.png" width="52%" alt="Browser step success against out-of-domain general accuracy for wev, Kev and Laya."></p>
|
|
125
|
+
|
|
126
|
+
Every model below receives the same requests and is scored the same way: per-question accuracy, with each model's
|
|
127
|
+
most probable option taken as its answer. All numbers are on held-out test splits.
|
|
128
|
+
|
|
129
|
+
**General typed decisions**
|
|
130
|
+
|
|
131
|
+
| Model | Kev decision-v7 | Kev transfer-v4 | typed-decisions |
|
|
132
|
+
|---|:---:|:---:|:---:|
|
|
133
|
+
| **wev-8b** | 82.4 | 77.2 | 79.1 |
|
|
134
|
+
| **wev-4b** | 80.6 | 73.8 | 79.4 |
|
|
135
|
+
| **wev-1.7b** | 81.1 | 65.5 | **79.5** |
|
|
136
|
+
| Kev-4B | **88.2** | **82.1** | 65.1 |
|
|
137
|
+
| Kev-8B | 88.1 | 76.8 | 62.7 |
|
|
138
|
+
| Laya (typed-decisions) | 65.7 | 62.8 | 76.8 |
|
|
139
|
+
| Laya | 64.3 | 63.7 | 36.2 |
|
|
140
|
+
|
|
141
|
+
**Browser steps.** Mind2Web test split: 873 requests on websites unseen in training. A step counts when both the
|
|
142
|
+
operation and the target element are right.
|
|
143
|
+
|
|
144
|
+
| Model | Step success | Operation |
|
|
145
|
+
|---|:---:|:---:|
|
|
146
|
+
| **wev-4b** | **75.9** | **91.2** |
|
|
147
|
+
| **wev-8b** | 75.5 | 90.3 |
|
|
148
|
+
| **wev-1.7b** | 68.2 | 88.1 |
|
|
149
|
+
| Kev-4B | 21.2 | 35.7 |
|
|
150
|
+
| Kev-8B | 19.0 | 73.3 |
|
|
151
|
+
| Laya (typed-decisions) | 0.7 | 13.1 |
|
|
152
|
+
| Laya | 0.0 | 2.5 |
|
|
153
|
+
|
|
154
|
+
**End to end on live websites.** jev-ultrafast ran 153 held-out tasks with each model as its System One. A task
|
|
155
|
+
succeeds when the agent says DONE and an LLM judge, reading the final page, agrees.
|
|
156
|
+
|
|
157
|
+
| System One | Tasks completed |
|
|
158
|
+
|---|:---:|
|
|
159
|
+
| wev-4b | 30 / 153 |
|
|
160
|
+
| wev-8b | 28 / 153 |
|
|
161
|
+
| qwen3-max, prompted (the teacher) | 27 / 153 |
|
|
162
|
+
|
|
163
|
+
<details>
|
|
164
|
+
<summary><b>Notes on the comparison</b></summary>
|
|
165
|
+
|
|
166
|
+
- *Kev decision-v7* is Kev's own training suite; wev also trains on its train split, and Kev leads there by 6–8
|
|
167
|
+
points. *Kev transfer-v4* is out of domain for every model in the table.
|
|
168
|
+
- wev and Laya (typed-decisions) train on 80% of the typed-decisions train split; Kev and plain Laya do not, so on
|
|
169
|
+
that column they are generalists.
|
|
170
|
+
- Kev and Laya ran as published, without web training data. wev is evaluated with a 4,096-token state; the 11
|
|
171
|
+
Mind2Web requests beyond it count as wrong for wev.
|
|
172
|
+
- Live sites change from run to run, so treat end-to-end gaps of a few tasks as noise. wev-4b's gain from its second
|
|
173
|
+
teacher collection held on a paired comparison (10 tasks gained, 1 lost).
|
|
174
|
+
- Test splits were held out from training and model selection, with one exception: wev-4b and wev-8b each had two
|
|
175
|
+
candidates, and both were read on test.
|
|
176
|
+
- Raw results are in [`results/`](https://github.com/alanhuangyoo/wev/tree/main/results).
|
|
177
|
+
|
|
178
|
+
</details>
|
|
179
|
+
|
|
180
|
+
<details>
|
|
181
|
+
<summary><b>Calibration: choosing when to stop</b></summary>
|
|
182
|
+
|
|
183
|
+
<p align="center"><img src="https://raw.githubusercontent.com/alanhuangyoo/wev/main/assets/stopping.png" width="55%" alt="DONE recall against premature DONE rate as the threshold on the DONE probability is swept."></p>
|
|
184
|
+
|
|
185
|
+
The hardest browser decision is when to stop. Accepting DONE only above a probability threshold trades missed stops
|
|
186
|
+
for early ones: at 0.8, wev-4b stops early on 3.8% of unfinished steps (8.5% at 0.5), and wev-8b on 1.7%.
|
|
187
|
+
|
|
188
|
+
</details>
|
|
189
|
+
|
|
190
|
+
## How it works
|
|
191
|
+
|
|
192
|
+
**Interface distillation.** An agent talks to its System One through typed requests. We serve a prompted LLM behind
|
|
193
|
+
that interface while the agent works on live websites, so every logged request and answer is already a training
|
|
194
|
+
example in the decision model's own format. An LLM judge reads each episode's final page and keeps only the episodes
|
|
195
|
+
whose outcome it confirms. It rejected 36% of the teacher's own DONE claims.
|
|
196
|
+
|
|
197
|
+
**Data.** We combine those episodes with Mind2Web and NNetNav steps converted to the same request format, and with
|
|
198
|
+
general typed-decision corpora. An LLM-judge audit of NNetNav's stopping labels overturned 31% of its DONE labels.
|
|
199
|
+
|
|
200
|
+
**Model.** A Qwen3 base model with its vocabulary head removed, adapted with LoRA and merged into the released
|
|
201
|
+
weights. Each question sees the state and itself only, so one forward pass answers every question in a request, and
|
|
202
|
+
question order never changes an answer. A pointer head scores each option against the question and normalises the
|
|
203
|
+
scores into probabilities.
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
<state> page text · elements · recent actions
|
|
207
|
+
<q> which operation? <opt> CLICK </opt> <opt> TYPE_TEXT </opt> … <opt> DONE </opt> <decide>
|
|
208
|
+
<q> which element to CLICK? <opt> [1] Search </opt> <opt> [2] Sign in </opt> … <decide>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
The [paper](https://github.com/alanhuangyoo/wev/blob/main/paper/icml/main.pdf) has the full method, ablations and failure analysis.
|
|
212
|
+
|
|
213
|
+
## Train your own
|
|
214
|
+
|
|
215
|
+
<details>
|
|
216
|
+
<summary><b>Data, training, evaluation and export commands</b></summary>
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
pip install -e ".[train,serve,dev]"
|
|
220
|
+
|
|
221
|
+
# data
|
|
222
|
+
python -m wev.mind2web --out data/m2w-v2 --dev_frac 0.15 --test_frac 0.1
|
|
223
|
+
python -m wev.nnetnav --out data/nnetnav-v2
|
|
224
|
+
python -m wev.general --out data/general --kev_repo path/to/kev
|
|
225
|
+
python -m wev.external --out data/ext
|
|
226
|
+
# DONE relabelling of NNetNav by an LLM judge (OpenAI-compatible endpoint from WEV_JUDGE_BASE_URL / _API_KEY / _MODEL)
|
|
227
|
+
python scripts/judge_done.py --data data/nnetnav-v2/train.jsonl --out judge-train.jsonl
|
|
228
|
+
python scripts/apply_judge.py --data data/nnetnav-v2 --judge 'judge-{split}.jsonl' --out data/nnetnav-v3-clean
|
|
229
|
+
|
|
230
|
+
# the wev-4b recipe; dir:K repeats a training file K times. One GPU works too: drop torchrun.
|
|
231
|
+
# wev-8b and wev-1.7b use the same mix without data/teacher-v2.
|
|
232
|
+
torchrun --nproc_per_node 8 -m wev.train --base Qwen/Qwen3-4B-Base --head pointer --lr 1e-4 --epochs 1 \
|
|
233
|
+
--batch_tokens 6000 --accum 1 --checkpointing 0 --out runs/wev-4b \
|
|
234
|
+
--data data/m2w-v2,data/nnetnav-v3-clean,data/teacher-v1:3,data/teacher-v2:3,data/general/kev-v7:2,data/general/typed-decisions-train:8,data/ext/tasksource-jev,data/ext/jev-distill,data/ext/td-synth
|
|
235
|
+
|
|
236
|
+
wev evaluate --model runs/wev-4b --data data/general/kev-transfer-v4 --split dev
|
|
237
|
+
wev export --run runs/wev-4b --out exports/wev-4b --check data/general/typed-decisions/dev.jsonl
|
|
238
|
+
pytest -q tests
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
The converted browser data and both teacher collections are on the Hub as
|
|
242
|
+
[`alanhuangya/wev-data`](https://huggingface.co/datasets/alanhuangya/wev-data); `validation.jsonl` is read as the
|
|
243
|
+
development split. To collect new teacher episodes, use `scripts/teacher_server.py`, `make_tasks.py`, `collect.py`
|
|
244
|
+
and `build_teacher_data.py`.
|
|
245
|
+
|
|
246
|
+
</details>
|
|
247
|
+
|
|
248
|
+
<details>
|
|
249
|
+
<summary><b>Training data and licenses</b></summary>
|
|
250
|
+
|
|
251
|
+
| Source | License | What it adds |
|
|
252
|
+
|---|---|---|
|
|
253
|
+
| [Mind2Web](https://huggingface.co/datasets/osunlp/Mind2Web) | CC BY 4.0 | human browser steps (click, type, select), split by website |
|
|
254
|
+
| [NNetNav-live](https://huggingface.co/datasets/stanfordnlp/nnetnav-live) | Apache-2.0 | live-web steps; DONE relabelled by an LLM judge |
|
|
255
|
+
| teacher episodes | outputs of qwen3-max | jev-ultrafast on live sites with qwen3-max as System One; judge-verified |
|
|
256
|
+
| [Kev decision-v7](https://github.com/jaredpalmer/kev) | per source | ten public classification and QA sources plus rule-composition records |
|
|
257
|
+
| [typed-decisions](https://huggingface.co/datasets/LocalLLaMA/typed-decisions) | Apache-2.0 | agent and ops workflows (80% of its train split) |
|
|
258
|
+
| [tasksource-jev](https://huggingface.co/datasets/tasksource/tasksource-jev) | mixed, per source task | hundreds of classification tasks recast as decisions |
|
|
259
|
+
| [jev-distill-corpus-v3](https://huggingface.co/datasets/SargeDev/jev-distill-corpus-v3) | Apache-2.0 | synthetic operational scenarios with soft labels |
|
|
260
|
+
| [typed-decisions-synth](https://huggingface.co/datasets/n4ze3m/typed-decisions-synth) | MIT | multi-question cases over 149 domains |
|
|
261
|
+
|
|
262
|
+
**Use terms.** The weights are released under Apache-2.0, but some training data carries its own terms: several
|
|
263
|
+
tasksource-jev source tasks are licensed for research only, and the teacher episodes are outputs of qwen3-max,
|
|
264
|
+
subject to its provider's terms. Treat the models as research artifacts and check those terms before commercial use.
|
|
265
|
+
|
|
266
|
+
</details>
|
|
267
|
+
|
|
268
|
+
## Limitations
|
|
269
|
+
|
|
270
|
+
- English only. wev makes decisions and does not write text; in jev-ultrafast, typed values come from its separate
|
|
271
|
+
text model.
|
|
272
|
+
- Browser targets are scored among the candidates the agent lists (8–40 per step), not every element on the page, so
|
|
273
|
+
the numbers are not comparable to the Mind2Web leaderboard.
|
|
274
|
+
- Rare operations are rarely predicted: BLOCKED and scrolling have low recall. On NNetNav, wev-4b says DONE too early
|
|
275
|
+
on 8–10% of steps unless you threshold it.
|
|
276
|
+
- On Kev's own suite, Kev is more accurate.
|
|
277
|
+
- wev has not been compared with Jev itself, because we have no API access.
|
|
278
|
+
|
|
279
|
+
## Citation
|
|
280
|
+
|
|
281
|
+
Jun Huang and Xin Ren contributed equally (University of Electronic Science and Technology of China).
|
|
282
|
+
|
|
283
|
+
```bibtex
|
|
284
|
+
@misc{huang2026wev,
|
|
285
|
+
title = {wev: Distilling LLM Browser Agents into Open, Local System-One Decision Models},
|
|
286
|
+
author = {Huang, Jun and Ren, Xin},
|
|
287
|
+
year = {2026},
|
|
288
|
+
url = {https://github.com/alanhuangyoo/wev}
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Acknowledgements and license
|
|
293
|
+
|
|
294
|
+
Apache-2.0. The model code builds on [kev](https://github.com/jaredpalmer/kev) (Apache-2.0) and uses instruction text
|
|
295
|
+
from [jev-ultrafast](https://github.com/browser-use/jev-ultrafast) (MIT); the models build on Qwen3 base models
|
|
296
|
+
(Apache-2.0). wev is an independent project, not affiliated with TypeSafe AI, and does not use Jev. See
|
|
297
|
+
[NOTICE](https://github.com/alanhuangyoo/wev/blob/main/NOTICE).
|