Skip to content

A compact, unified multimodal model family with a single shared vision–language backbone, built for on-device and in-app intelligence.

Refine the project narrative and capability presentation

xiaoyuan19960c7e4cb85ce5
diff --git a/README.md b/README.md
index 983a8b6..e952893 100644
--- a/README.md
+++ b/README.md
@@ -10,78 +10,69 @@
## Model Introduction
-WePM is a unified multimodal model built for on-device AI. Instead of keeping one model per capability — an embedding model for album search, a generator for OCR and visual question answering, and a classifier for tool routing — WePM keeps a single 4B vision–language backbone in BF16 (≈8 GB of weights) and serves all of them from the same parameters.
+On-device AI applications rarely depend on a single capability. A personal assistant may need multimodal retrieval to find local content, generation to understand and respond, and decision making to route the next action. Deploying a separate specialist for each path duplicates vision encoders and language backbones, increasing resident memory, system complexity and the cost of keeping intelligence always available on device.
+
+**WePM** is a 4B unified multimodal model designed around a different principle: one compact vision–language backbone should support multiple capability families without sacrificing their individual quality. A single set of parameters provides:
- **Representation** — L2-normalized multimodal embeddings for image retrieval, text retrieval and candidate ranking.
-- **Generation** — OCR, image captioning, visual question answering, summarization and assistant replies.
-- **Decision** — typed decision paths for option selection, ordinal scoring and binary judgment.
+- **Generation** — OCR, image captioning, visual question answering, summarization and assistant responses.
+- **Decision** — typed outputs for option selection, ordinal scoring and binary judgment.
+
+In BF16, the shared 4B backbone occupies approximately 8 GB of weight memory. More importantly, it replaces several independently resident models with one common foundation for local multimodal applications.
<p align="center">
<img src="assert/wepm_function.png" width="640" alt="WePM capabilities and applications">
</p>
-Unifying these paths is not a matter of mixing datasets. When representation, generation and decision share one compact backbone, three conflicts appear: the visual granularity each task needs differs, the supervision each dataset provides is different, and the loss scales of the three tasks are not comparable. WePM addresses them with three designs:
+### Reconciling Conflicts in a Unified Model
+
+Simply mixing heterogeneous tasks does not make them compatible. WePM identifies conflicts at three levels: different tasks require different visual granularity, their datasets provide different forms of supervision, and their losses operate at different scales and training rhythms. WePM reconciles these conflicts with three complementary components:
+
+- **MGVB (Multi-Granularity Visual Bottleneck)** organizes a fixed visual-token budget into global, regional and fine-grained banks. It preserves scene-level semantics, object relations and local details while allowing each task to focus on the evidence it needs.
+- **ULKD (Unified Listwise Knowledge Distillation)** transfers complementary knowledge from generation and representation teachers into one student. On the generation path, the teacher supervises prefixes visited by the student itself; on the representation path, the student learns both candidate rankings and embedding structure.
+- **SEMO (Stable and Efficient Multitask Optimization)** schedules heterogeneous tasks and accumulates their gradients through sequential forward/backward passes before a shared update. This stabilizes optimization while avoiding the memory cost of retaining every task graph concurrently.
-- **MGVB (Multi-Granularity Visual Bottleneck)** splits a fixed visual token budget into global, regional and fine-grained banks, so a task can allocate its limited context to the visual evidence it actually needs.
-- **ULKD (Unified Listwise Knowledge Distillation)** distills from two teachers — a generation teacher and a representation teacher — along the student's own generation trajectory, so unpaired retrieval and generation data can supervise one student.
-- **SEMO (Stable and Efficient Multitask Optimization)** fixes task loss coefficients, schedules how often each task appears per round, and accumulates gradients across sequential forward/backward passes before a single update. This removes the need to keep all task computation graphs alive at once.
+Together, these designs align visual evidence, learning signals and optimization dynamics within one compact backbone.
<p align="center">
<img src="assert/last.png" width="640" alt="WePM architecture">
</p>
-## Performance
+## Performance Across Three Capability Families
-Evaluation covers 16 benchmarks in five groups: image retrieval, text retrieval, math and science reasoning, visual question answering, and OCR / document understanding. All baselines were reproduced with identical input resolution and evaluation scripts. `Joint` is not a flat average over benchmarks: it first aggregates the Embedding and Generation groups separately, then averages the two group scores with equal weight.
-
-<table align="center">
- <thead>
- <tr><th>Method</th><th>ImageRet.</th><th>TextRet.</th><th>Math</th><th>VQA</th><th>OCR</th><th>Joint</th></tr>
- </thead>
- <tbody>
- <tr><td>CAFe</td><td>22.83</td><td>30.30</td><td>7.18</td><td>13.71</td><td>40.97</td><td>23.59</td></tr>
- <tr><td>FROMAGe</td><td>32.30</td><td>33.12</td><td>22.60</td><td>34.29</td><td>61.86</td><td>36.15</td></tr>
- <tr><td>MMGen</td><td>30.93</td><td>33.26</td><td>24.17</td><td>39.05</td><td>60.11</td><td>36.60</td></tr>
- <tr><td>ULME</td><td>34.13</td><td>32.78</td><td>28.16</td><td>41.46</td><td>58.93</td><td>38.15</td></tr>
- <tr><td><strong>WePM</strong></td><td><strong>41.30</strong></td><td><strong>35.90</strong></td><td><strong>58.60</strong></td><td><strong>60.84</strong></td><td><strong>81.18</strong></td><td><strong>52.74</strong></td></tr>
- </tbody>
-</table>
+WePM is evaluated across all three capability families rather than through a single aggregate score: **Embedding** covers 20 datasets and 10 models, **Generation** covers 36 datasets and 9 models, and **Decision** covers 4 datasets and 17 models. The figure summarizes the benchmark-level comparisons and reports WePM's overall rank within each evaluation pool.
<p align="center">
<img src="assert/performance.png" width="1080" alt="Per-benchmark ranking of WePM across the Embedding, Generation and Decision capability families">
</p>
-The polar charts rank WePM against all evaluated models on every benchmark of each capability family: Embedding (20 benchmarks, 10 models), Generation (36 benchmarks, 9 models) and Decision (4 benchmarks, 17 models). WePM ranks first in all three families.
-
-Against ULME, the strongest prior unified retrieval–generation baseline, WePM improves ImageRet. by +7.17, TextRet. by +2.64, Math by +30.44, VQA by +19.38 and OCR by +19.32, lifting `Joint` from 38.15 to 52.74 (+14.59). The gains are not concentrated in one group: the Embedding aggregate reaches 38.60 (ULME: 33.46) and the Generation aggregate reaches 66.87 (ULME: 42.85).
-
-Decision capability (choice, ordinal scoring, binary judgment) is evaluated on 4 benchmarks against 17 models, where WePM also ranks first; its benchmark-level breakdown is the rightmost chart above.
+WePM ranks first overall in all three families. The result is important for a unified model: adding generation and typed decision paths does not come at the expense of multimodal representation, while strengthening representation does not dilute OCR, visual reasoning or decision quality. The model therefore expands the range of supported tasks without reducing any capability family to a nominal add-on.
## Heterogeneous Capability Density (HCD)
-Parameter count and per-benchmark scores do not answer the question that matters on a device: **for a fixed resident memory budget, how much usable intelligence does a model provide?**
-
-HCD is defined as:
+Benchmark quality alone does not capture the central constraint of on-device deployment: **how much usable intelligence can remain resident within a fixed memory budget?** We introduce **Heterogeneous Capability Density (HCD)** to jointly account for capability breadth, capability quality and resident inference memory.
<p align="center">
<img src="assert/hcd_formula.png" width="640" alt="HCD = (number of capability families above the usability threshold) x (aggregate capability quality) / (resident inference memory)">
</p>
-Counting is done per capability family, not per benchmark: OCR, captioning and VQA all belong to Generation and are not counted three times.
+HCD counts capability families rather than individual benchmarks. For example, OCR, captioning and visual question answering all contribute to Generation instead of being counted as three separate capabilities. A higher HCD therefore indicates that a model delivers broader and stronger usable intelligence per unit of resident memory—not merely that it has been evaluated on more tasks.
<p align="center">
<img src="assert/memory_vs_quality.png" width="640" alt="HCD comparison between WePM and six independent three-model compositions">
</p>
-The chart compares WePM with six independent compositions of a generator, a multimodal embedder and a decision model (d3-4.5B). Memory is counted as BF16 weights only; KV cache, activations, framework overhead and runtime fragmentation are excluded. With ≈8 GB, WePM reaches a harmonic performance of ≈68% and an HCD of 0.255, while the lightest independent composition (M1, ≈21 GB) reaches HCD 0.096 and the heaviest (M6, ≈41 GB) only 0.049 — stacking separate models costs roughly 2.6× to 5× the weight memory and still lowers the capability density.
+The comparison pairs independent generation and embedding models with the same 4.5B decision model. WePM reaches approximately 68% harmonic performance with about 8 GB of BF16 weight memory, yielding an HCD of 0.255. The six independent three-model compositions require roughly 21–41 GB, yet achieve HCD values of only 0.049–0.096. In this comparison, unifying the three capability families provides substantially higher capability density than stacking specialized models.
+
+The memory values above count BF16 weights only. KV cache, activations, framework overhead and runtime fragmentation are excluded.
## Applications
-Both demos run fully on device: no image, text or interaction data leaves the local machine.
+WePM is intended as a shared local intelligence layer rather than a collection of benchmark-specific interfaces. The following demos run fully on device, keeping personal images, text and interaction data local.
### 1. Personal Agent
-One WePM-4B handles the whole loop — retrieving local content, generating a reply grounded in personal information, and making the typed decision that routes the next step. Retrieval, generation and decision alternate inside a single resident model.
+A single resident WePM-4B supports the complete local workflow: it retrieves relevant personal content, understands multimodal context, generates a grounded response and makes the typed decision that routes the next step. Retrieval, generation and decision are composed within one model instead of being dispatched to separate services.
<p align="center">
<video src="assert/personal_agent_demo.mp4" poster="assert/personal_agent_poster.jpg" width="640" controls muted loop playsinline></video>
@@ -93,7 +84,7 @@ If the player above is not rendered by your Markdown viewer, open the [MP4 demo]
### 2. On-Device Game Assistant
-The same WePM-4B reads game frames and on-screen text, retrieves local knowledge and history, generates real-time suggestions, and performs option judgment or action routing for the current state — avoiding a separate vision model, retrieval model and decision model.
+The same WePM-4B interprets game frames and interface text, retrieves local knowledge and interaction history, generates contextual suggestions, and performs option judgment or action routing. This turns one continuously resident model into a complete multimodal game assistant without separately loading vision, retrieval and decision models.
<p align="center">
<video src="assert/game_assistant_demo.mp4" poster="assert/game_assistant_poster.jpg" width="640" controls muted loop playsinline></video>