risenyard commited on
Commit
dc6ae9e
·
verified ·
1 Parent(s): 7a30369

Add files using upload-large-folder tool

Browse files
Files changed (2) hide show
  1. README.md +40 -34
  2. args.json +63 -52
README.md CHANGED
@@ -8,54 +8,60 @@ tags:
8
  - egms
9
  ---
10
 
11
- # EGMS-QA · Encoder
12
 
13
- Frozen spatio-temporal encoder checkpoint for **EGMS-QA**, a natural-language
14
- question-answering system over
15
- [European Ground Motion Service](https://egms.land.copernicus.eu/) (EGMS)
16
- persistent-scatterer displacement time series.
17
 
18
- The encoder maps a variable-size 7 km tile of point displacement histories to a
19
- fixed **65-token** representation (1 tile summary + 8×8 spatial cells, 256-d),
20
- trained self-supervised with masked reconstruction. It is frozen downstream.
 
21
 
22
- Code: [`src/egms_encoder`](https://github.com/risenyard/egms-qa/tree/main/src/egms_encoder) ·
23
- Companion repos: [`risenyard/egms-qa-dataset`](https://huggingface.co/datasets/risenyard/egms-qa-dataset) ·
24
- [`risenyard/egms-qa-translator`](https://huggingface.co/risenyard/egms-qa-translator)
25
 
26
  ## Files
27
 
28
- | file | what it is |
29
  |---|---|
30
- | `encoder.pt` | frozen encoder checkpoint (`model` state dict + training args) |
31
- | `normalization.json` | mean / std / residual-std used to normalize the input series |
32
- | `args.json` | training configuration that produced the checkpoint |
33
 
34
- The precomputed **token cache** and the **processed source tiles** live in the dataset repo
35
- [`risenyard/egms-qa-dataset`](https://huggingface.co/datasets/risenyard/egms-qa-dataset)
36
- (`artifacts/representations/`, `artifacts/source_tiles/`). The dataset release
37
- installer links those publication paths to `data/encoder/tokens/` and
38
- `data/tiles/`; the split manifest is in the code repo under
39
- `data/encoder/manifest/`.
40
-
41
- ## Use
42
-
43
- Download the flat files into the checkout path the code expects, then load with
44
- the `egms_encoder` model code from the GitHub repo and re-extract tokens:
45
 
46
  ```bash
47
- hf download risenyard/egms-qa-encoder --local-dir data/encoder/checkpoint
 
 
 
 
 
48
  hf download risenyard/egms-qa-dataset \
49
  --repo-type dataset --local-dir release/egms-qa-dataset
50
  python -m egms_qa.release install \
51
  --release-dir release/egms-qa-dataset --target-root .
52
 
53
- python -m egms_encoder.extract_tokens \
54
- --checkpoint data/encoder/checkpoint/encoder.pt \
55
- --manifest data/encoder/manifest/split.parquet \
56
- --output-dir outputs/tokens
57
  ```
58
 
59
- `normalization.json` and `args.json` sit next to `encoder.pt`, so the checkpoint
60
- is self-contained. Most users can skip extraction and use the released token
61
- cache from the dataset repo. Licensed CC-BY-4.0.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  - egms
9
  ---
10
 
11
+ # EGMS-QA Encoder
12
 
13
+ Frozen spatio-temporal encoder checkpoint for EGMS-QA, a natural-language
14
+ question-answering system over European Ground Motion Service persistent-
15
+ scatterer displacement time series.
 
16
 
17
+ The encoder maps a variable-size 7 km tile to 65 tokens: one tile-summary token
18
+ plus 64 spatial-cell tokens on an 8×8 grid, each with dimension 256. It was
19
+ trained by synchronized-block masked reconstruction and remains frozen during
20
+ translator training.
21
 
22
+ Code: [`risenyard/egms-qa`](https://github.com/risenyard/egms-qa/tree/main/src/egms_encoder) ·
23
+ Dataset: [`risenyard/egms-qa-dataset`](https://huggingface.co/datasets/risenyard/egms-qa-dataset) ·
24
+ Translators: [`risenyard/egms-qa-translator`](https://huggingface.co/risenyard/egms-qa-translator)
25
 
26
  ## Files
27
 
28
+ | file | contents |
29
  |---|---|
30
+ | `encoder.pt` | model state dictionary and embedded training arguments |
31
+ | `normalization.json` | input mean, standard deviation, and residual statistics |
32
+ | `args.json` | normalized public training and architecture configuration |
33
 
34
+ ## Use with the structured dataset release
 
 
 
 
 
 
 
 
 
 
35
 
36
  ```bash
37
+ git clone https://github.com/risenyard/egms-qa
38
+ cd egms-qa
39
+ pip install -e .
40
+
41
+ hf download risenyard/egms-qa-encoder \
42
+ --local-dir data/encoder/checkpoint
43
  hf download risenyard/egms-qa-dataset \
44
  --repo-type dataset --local-dir release/egms-qa-dataset
45
  python -m egms_qa.release install \
46
  --release-dir release/egms-qa-dataset --target-root .
47
 
48
+ python -m egms_encoder.extract_tokens --output-dir outputs/tokens
 
 
 
49
  ```
50
 
51
+ Most translator users can use the released token cache under
52
+ `artifacts/representations/` in the dataset repository and skip encoder
53
+ execution entirely.
54
+
55
+ ## Data and scope
56
+
57
+ The model consumes the `[8,302)` slice of each processed 304-step source tile,
58
+ giving 294 input steps. Coordinates are centred per tile and divided by the
59
+ 3,500 m half-width before coordinate embedding.
60
+
61
+ The encoder represents observed deformation histories; it does not determine
62
+ cause, forecast motion, certify structural safety, or replace expert InSAR and
63
+ geotechnical assessment.
64
+
65
+ The checkpoint is CC-BY-4.0. Copernicus-derived source measurements are
66
+ distributed separately in `risenyard/egms-qa-dataset` under the CLMS data
67
+ policy and attribution conditions documented there.
args.json CHANGED
@@ -1,53 +1,64 @@
1
  {
2
- "checkpoint_every_steps": 5000,
3
- "coord_scale": 3500.0,
4
- "d_model": 256,
5
- "device": "cuda:0",
6
- "dropout": 0.1,
7
- "duration_hours": null,
8
- "eval_mask_ratio": 0.3,
9
- "init_from_checkpoint": null,
10
- "input_length": 294,
11
- "log_every_steps": 200,
12
- "lr": 0.0004,
13
- "lr_scheduler": "cosine",
14
- "mask_ratio": 0.3,
15
- "mask_schedule": "fixed",
16
- "mask_strategy": "block",
17
- "max_steps": 150000,
18
- "max_tile_points": 4096,
19
- "min_lr": 3e-05,
20
- "min_tile_points": 200,
21
- "model_version": "v3_3",
22
- "num_heads": 8,
23
- "num_layers": 6,
24
- "output_dir": "outputs/encoder_pretrain",
25
- "patch_size": 8,
26
- "point_sampling": "residual_weighted",
27
- "precision": "bf16",
28
- "residual_consistency_weight": 0.1,
29
- "residual_head_lr": 0.0001,
30
- "residual_head_mode": "additive",
31
- "residual_loss_weight": 1.0,
32
- "residual_sampling_alpha": 0.75,
33
- "resume_from": null,
34
- "scheduler_total_steps": 150000,
35
- "seed": 42,
36
- "split_strategy": "random",
37
- "stratify_bins": 3,
38
- "sync_mask": true,
39
- "temporal_heads": 4,
40
- "temporal_layers": 2,
41
- "test_fraction": 0.1,
42
- "tile_size": 7000.0,
43
- "tiles_per_batch": 8,
44
- "train_window_steps": 1000,
45
- "v4_config": "data/processed/v4/v4_data_config.json",
46
- "v4_normalization": "data/processed/v4/v4_normalization.json",
47
- "val_batches": 16,
48
- "val_every_steps": 1000,
49
- "val_fraction": 0.1,
50
- "val_seed": 1729,
51
- "warmup_steps": 1000,
52
- "weight_decay": 0.01
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
1
  {
2
+ "schema_version": "egms-qa-encoder-training-config-1.0",
3
+ "release_name": "egms-qa-encoder",
4
+ "architecture": {
5
+ "class": "egms_encoder.models.tile_encoder.TileEncoder",
6
+ "input_length": 294,
7
+ "patch_size": 8,
8
+ "d_model": 256,
9
+ "temporal_layers": 2,
10
+ "temporal_heads": 4,
11
+ "spatial_layers": 6,
12
+ "spatial_heads": 8,
13
+ "dropout": 0.1,
14
+ "coord_scale_m": 3500.0,
15
+ "residual_head_mode": "additive"
16
+ },
17
+ "data": {
18
+ "manifest": "data/encoder/manifest/split.parquet",
19
+ "data_config": "data/encoder/manifest/data_config.json",
20
+ "normalization": "data/encoder/checkpoint/normalization.json",
21
+ "tile_size_m": 7000.0,
22
+ "minimum_points_per_tile": 200,
23
+ "maximum_points_per_tile": 4096,
24
+ "split_seed": 1729
25
+ },
26
+ "masking": {
27
+ "strategy": "synchronized_block",
28
+ "train_ratio": 0.3,
29
+ "evaluation_ratio": 0.3,
30
+ "schedule": "fixed"
31
+ },
32
+ "point_sampling": {
33
+ "method": "residual_weighted",
34
+ "residual_sampling_alpha": 0.75
35
+ },
36
+ "loss": {
37
+ "residual_loss_weight": 1.0,
38
+ "residual_consistency_weight": 0.1
39
+ },
40
+ "optimization": {
41
+ "optimizer": "AdamW",
42
+ "maximum_steps": 150000,
43
+ "tiles_per_batch": 8,
44
+ "learning_rate": 0.0004,
45
+ "minimum_learning_rate": 0.00003,
46
+ "residual_head_learning_rate": 0.0001,
47
+ "scheduler": "cosine",
48
+ "scheduler_total_steps": 150000,
49
+ "warmup_steps": 1000,
50
+ "weight_decay": 0.01,
51
+ "precision": "bf16",
52
+ "seed": 42
53
+ },
54
+ "validation": {
55
+ "batches": 16,
56
+ "interval_steps": 1000,
57
+ "seed": 1729
58
+ },
59
+ "checkpointing": {
60
+ "interval_steps": 5000,
61
+ "log_interval_steps": 200,
62
+ "rolling_window_steps": 1000
63
+ }
64
+ }