ErnestBeckham commited on
Commit
902fcdd
·
verified ·
1 Parent(s): 50930a9

Phase 2 checkpoint, epoch 16

Browse files
Files changed (1) hide show
  1. phase2_sft_v2/README.md +106 -0
phase2_sft_v2/README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: mmm
3
+ tags:
4
+ - motion-matching
5
+ - character-animation
6
+ - state-space-model
7
+ - mamba
8
+ ---
9
+
10
+ # MMM-versions
11
+
12
+ Retrieval augmented state space model for real time character animation: a
13
+ Mamba backbone that takes a joystick request, its own previous pose, and `k`
14
+ poses retrieved from a motion matching database, and predicts the next pose.
15
+
16
+ This is a **Phase 2** checkpoint (distillation from the KNN teacher).
17
+
18
+ ## This model is not usable on its own
19
+
20
+ The retrieved candidate poses are part of the input, not an optional extra.
21
+ Without the matching database the model is being fed zeros in 78%
22
+ of its input width and will not produce correct motion.
23
+
24
+ The database this checkpoint was trained against:
25
+
26
+ | | |
27
+ | --- | --- |
28
+ | fingerprint | `4a6be2e54d60cf06` |
29
+ | rows (frames) | 264,410 |
30
+ | pose width | 151 |
31
+ | frame time | 0.016666666666666666 s |
32
+ | clips | 18 (run1_subject2, run1_subject5, run2_subject1, run2_subject4...) |
33
+
34
+ The database is built from LaFAN1 and is **not** distributed here. Rebuild it
35
+ with `scripts/build_databases.py`; the fingerprint above must match, or the
36
+ retrieved poses are in a different space from the ones the model learned on.
37
+
38
+ ## Architecture
39
+
40
+ | | |
41
+ | --- | --- |
42
+ | backbone | MambaBackbone |
43
+ | n_layers | 4 |
44
+ | d_model | 256 |
45
+ | d_state | 16 |
46
+ | d_conv | 4 |
47
+ | d_inner | 512 |
48
+ | head | full |
49
+ | pose_dim | 151 |
50
+ | joystick_dim | 12 |
51
+ | n_candidates | 4 |
52
+ | input_dim | 771 |
53
+ | output_dim | 153 |
54
+ | predict_contacts | True |
55
+ | parameters | 1,989,273 |
56
+ | use_retrieval | True |
57
+
58
+ ## Training
59
+
60
+ | epoch | train | validation |
61
+ | --- | --- | --- |
62
+ | 1 (first) | 0.1842 | 0.1200 |
63
+ | 24 (best) | 0.1210 | 0.0959 |
64
+
65
+ Trained for 24 epochs.
66
+
67
+ ## Retrieval gain
68
+
69
+ The number this project is actually judged on. It is the validation loss with
70
+ the retrieved candidates zeroed, minus the loss with them present, so positive
71
+ means retrieval is helping.
72
+
73
+ It is reported in two regimes and **only the free running one is meaningful**.
74
+ Under teacher forcing the model is handed the true previous pose every frame,
75
+ and at 60Hz that is a far better predictor than any retrieved candidate --
76
+ measured on this database, copying the previous pose scores 2.29 while copying
77
+ the nearest candidate scores 16.24. A teacher forced model is therefore right
78
+ to ignore retrieval, and its gain sits at zero whatever the model has learned.
79
+
80
+ | regime | with retrieval | without | gain |
81
+ | --- | --- | --- | --- |
82
+ | teacher forced | 0.0959 | 0.1963 | +0.1004 |
83
+ | **free running** | 0.4812 | 0.5325 | **+0.0513** |
84
+
85
+ ## Provenance
86
+
87
+ - Rotation maths cross validated against GenoViewPython's `quat.py`
88
+ (MIT, Copyright (c) 2024 Daniel Holden) to 1e-9.
89
+ - Spring damper after Holden, *Spring-It-On*; inertialization after Bollo,
90
+ GDC 2018; 6D rotations after Zhou et al., CVPR 2019.
91
+ - Learned Motion Matching (Holden et al., SIGGRAPH 2020) is background and
92
+ baseline for this work, not its architecture.
93
+
94
+ See `NOTICE.md` in the source repository for the full attribution.
95
+
96
+ ## Format
97
+
98
+ `safetensors`, with the run's architecture, config and calibrated loss weights
99
+ JSON encoded in the metadata header. No pickle is involved in loading.
100
+
101
+ ```python
102
+ from safetensors import safe_open
103
+
104
+ with safe_open("best.safetensors", framework="pt") as f:
105
+ print(f.metadata()["architecture"])
106
+ ```