Add M2 model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags: [narrative-context, film-analysis, multi-task, pytorch, transformer, position-aware]
|
| 4 |
+
---
|
| 5 |
+
# Narrative Context Module 2 (Position-Aware)
|
| 6 |
+
|
| 7 |
+
Cross-scene feature evolution Transformer for film narrative understanding.
|
| 8 |
+
Consumes 256-d scene embeddings from [`wrathofgod/scene-perception-m1-unfreeze-deberta-small`](https://huggingface.co/wrathofgod/scene-perception-m1-unfreeze-deberta-small).
|
| 9 |
+
|
| 10 |
+
## Architecture Upgrades vs Previous M2
|
| 11 |
+
|
| 12 |
+
| Component | Old M2 | New M2 |
|
| 13 |
+
|-----------|--------|--------|
|
| 14 |
+
| Feature dim | 304-d | 308-d (sin/cos position) |
|
| 15 |
+
| Positional encoding | window-relative only | window-relative + film-absolute MLP |
|
| 16 |
+
| Feature evolution | none | DeltaEncoder (GLU) as extra token |
|
| 17 |
+
| Sequence length | 5 | 7 ([CLS] + 5 scenes + [DELTA]) |
|
| 18 |
+
| Context fusion | last token only | CLS ⊕ current-scene via fusion gate |
|
| 19 |
+
| Transformer depth | 4L × 8H, FFN=512 | 6L × 8H, FFN=768 |
|
| 20 |
+
| Label smoothing | none | ε=0.1 |
|
| 21 |
+
|
| 22 |
+
## Input
|
| 23 |
+
5-scene causal window [t-4 … t] per film.
|
| 24 |
+
Per-scene feature: 305-d (M1 embedding + metadata + sin/cos position).
|
| 25 |
+
Film position (0-1 scalar) fed separately to FilmPositionEncoder.
|
| 26 |
+
|
| 27 |
+
## 7 Prediction Heads
|
| 28 |
+
| # | Head | Type | Output |
|
| 29 |
+
|---|------|------|--------|
|
| 30 |
+
| 1 | scene_valence_continuous | regression | -1.0 to 1.0 |
|
| 31 |
+
| 2 | tension_level | regression | 1 to 10 |
|
| 32 |
+
| 3 | arousal_level | regression | 1 to 10 |
|
| 33 |
+
| 4 | emotional_shift_trigger | binary | True / False |
|
| 34 |
+
| 5 | narrative_arc_position | 5-class | Setup / Rising / Climax / Falling / Resolution |
|
| 35 |
+
| 6 | foreshadowing_type | 4-class | None / Foreshadow / Payoff / Echo |
|
| 36 |
+
| 7 | transition_type | 5-class | attacca / fade / segue / silence / cut |
|