Skip to content

Bump actions/cache from 3 to 4 - #86

Merged
epwalsh merged 2 commits into
mainfrom
dependabot/github_actions/actions/cache-4
Nov 8, 2024
Merged

epwalsh merged 2 commits into
mainfrom
dependabot/github_actions/actions/cache-4

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 8, 2024

Copy link
Copy Markdown
Contributor

Bumps actions/cache from 3 to 4.

Release notes

Sourced from actions/cache's releases.

v4.0.0

What's Changed

New Contributors

Full Changelog: actions/cache@v3...v4.0.0

v3.3.3

What's Changed

New Contributors

Full Changelog: actions/cache@v3...v3.3.3

v3.3.2

What's Changed

New Contributors

Full Changelog: actions/cache@v3...v3.3.2

v3.3.1

What's Changed

Full Changelog: actions/cache@v3...v3.3.1

v3.3.0

What's Changed

... (truncated)

Changelog

Sourced from actions/cache's changelog.

Releases

4.1.2

  • Add GitHub Enterprise Cloud instances hostname filters to inform API endpoint choices - #1474
  • Security fix: Bump braces from 3.0.2 to 3.0.3 - #1475

4.1.1

  • Restore original behavior of cache-hit output - #1467

4.1.0

  • Ensure cache-hit output is set when a cache is missed - #1404
  • Deprecate save-always input - #1452

4.0.2

  • Fixed restore fail-on-cache-miss not working.

4.0.1

  • Updated isGhes check

4.0.0

  • Updated minimum runner version support from node 12 -> node 20

3.3.3

  • Updates @​actions/cache to v3.2.3 to fix accidental mutated path arguments to getCacheVersion actions/toolkit#1378
  • Additional audit fixes of npm package(s)

3.3.2

  • Fixes bug with Azure SDK causing blob downloads to get stuck.

3.3.1

  • Reduced segment size to 128MB and segment timeout to 10 minutes to fail fast in case the cache download is stuck.

3.3.0

  • Added option to lookup cache without downloading it.

3.2.6

  • Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted runners.

3.2.5

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github

dependabot Bot commented on behalf of github Nov 8, 2024

Copy link
Copy Markdown
Contributor Author

The following labels could not be found: dependencies/actions.

@epwalsh
epwalsh enabled auto-merge (squash) November 8, 2024 18:35
@epwalsh
epwalsh merged commit d548d3b into main Nov 8, 2024
@epwalsh
epwalsh deleted the dependabot/github_actions/actions/cache-4 branch November 8, 2024 18:36
dhgottesman pushed a commit to dhgottesman/OLMo-core that referenced this pull request Dec 30, 2025
dhgottesman pushed a commit to dhgottesman/OLMo-core that referenced this pull request Dec 30, 2025
jason718 added a commit that referenced this pull request Nov 7, 2026
Stacked on #916. This prepares an ablation PT asked for: Run 2 (the
"Ablation 2" config, row 34 of the midtraining results sheet: 256K,
`lm1e-4` alignment parent, MT+ with agentic data, vision v6), rerun with
EMo turned **on with causal pools** during mid-training instead of EMo
off. The hero recipe currently runs every downstream stage with EMo off.

## Why

From Akshita's write-up and MaxText work (oe-planning #86–#88, #97):
- Whole-document EMo picks each document's pool from router scores
summed over the **entire** document, future tokens included. A
document's first tokens are therefore routed with information they won't
have at inference.
- The cost in her tests:
  - First-16-token loss is 1.3–1.9 nats worse.
- On a bare prompt, the model ends the document immediately in 13 of 16
cases.
- Causal pools fix this and keep modularity on her tiny-model decay
(step 9,499):

| Decay | First-16 CE (all experts) | Own 64-expert pool CE | Bare
prompt ends immediately |
|---|---|---|---|
| EMo off | 3.33 | 2.135 | 0/16 |
| EMo on | 5.20 | 2.092 | 13/16 |
| Causal | 3.34 | 2.067 | 0/16 |

Causal pools haven't been tested in mid-training yet, which is what this
run is for. The bar is "no regression against Run 2" on our evals. PT
runs the modularity checks on the checkpoint.

## What changes

### 1. `EmoRouterConfig.causal_pool`
Off by default; the default path is unchanged. This is the same rule as
the MaxText `emo_causal_pool` flag (AkshitaB/maxtext@7b2380e):
- MaxText's `csum_end - csum_before` (whole document) becomes `csum -
csum_before`: the sum of the document's scores up to and including each
token, in fp32 on the softmax scores. Here that's `ops.doc_prefix_sum`,
used in place of `ops.doc_sum_scatter`.
- Each token's pool is the top-P experts by those sums. A document's
first token keeps its own top experts, the pool narrows as the document
goes on, and the last token's pool equals the whole-document pool.
- In causal mode the env-gated fused `document_pool_keep_mask` profiling
kernel is bypassed.

### 2. EMo document boundaries in `MultimodalLM` (no MaxText
counterpart)
- Until now the LM derived EMo documents from EOS tokens
(`segment_ids_from_eos`). That matched attention in text pretraining.
- In mixed mid-training batches, attention documents aren't
EOS-delimited:
- The text side is 32 unrelated 8K chunks per 256K instance, with no EOS
at chunk ends.
  - Packed vision examples need not end in EOS.
- Without this change, a pool would span unrelated chunks or examples.
- `MultimodalLM` now passes its attention documents to
`Transformer._prepare_inputs` as `emo_segment_ids`. These come from
`example_ids`, or `document_ids` when set: the text stage's EOS +
8K-chunk segments. A padding run counts as one document.
- Pools therefore restart exactly where attention and KDA state restart.
- Nothing is passed when the LM has no EMo routers, and plain
`Transformer` callers are unchanged.

## Pool sizes: same as pretraining

When a stage keeps EMo (`apply_stage_routing(use_emo=True)` in
scaling-ladders), it reuses the source checkpoint's router config
unchanged. I checked both source checkpoints
(`olmo35-small-hero-20260907/emo/14T` and
`olmo35-small-14t-plus600bdecay-20261008-emo/step870229`):
- 512 routed experts, top-k 16.
- `min_document_expert_pool=16`, `max_document_expert_pool=512`: each
document draws one pool size P uniformly from 16–512, independently in
each MoE layer. Each token picks its 16 experts from inside its pool.
  - P = 16: every token in the document uses the same 16 experts.
  - P = 512: no restriction.
- `eval_document_expert_pool=512`: eval and HF export use all experts,
so EMo (causal or not) is a no-op for our standard evals. Only PT's
modularity checks use small pools.

The {32, 64, 256} sizes (probabilities 1/8, 1/8, 3/4) in the write-up
are MaxText's tiny-model "r3" recipe. The write-up finds those sizes
aren't special.

## Tests

`src/test/nn/moe/emo_router_v2_test.py`. The two router tests mirror
MaxText's `EmoEvalPoolsTest` cases:
- Same setup: router weight = identity so expert logits are given
directly; pools sampled in [2, 8] of 8 experts.
- Same documents: 6 + 10 tokens in row 0 and 16 tokens in row 1.
- The pool mask is read from the router's `pool_keep_mask` call.

| Test | Checks |
|---|---|
| `test_causal_pool_ignores_later_tokens` | Noise added to tokens 9
onward leaves the pool masks of tokens 0–8 unchanged and changes later
ones (as MaxText's `test_causal_pool_ignores_later_tokens`) |
| `test_causal_pool_first_token_keeps_its_own_top_experts` | Each
document's first token keeps exactly its own top-P logits, and its last
token's mask equals the whole-document one (as MaxText's test of the
same name) |
| `test_doc_prefix_sum_matches_per_document_cumsum` | Prefix sums match
a brute-force per-document cumsum over 4 segment layouts, and the last
token of each document matches `doc_sum_scatter` |
| `test_multimodal_emo_segments_follow_example_ids` | Document numbering
from `example_ids`, including the padding run |

Differences from MaxText's tests:
- Segment ids are 0-based, as OLMo-core's are.
- The seed is chosen so every first-token pool actually restricts its
document (pools of 3, 7 and 6 experts). The test asserts this, so it
can't pass trivially with a full pool.

Results (CPU):
- EMo tests (`emo_router_v2_test.py` + `emo_document_pool_test.py`): 16
passed, 5 skipped (GPU-only kernel tests).
- With causal mode disabled in the router, both causal tests fail, as
they should.
- `src/test/nn/vision/multimodal_test.py`: 46 passed.
- isort, black and ruff are clean. mypy reports nothing in the changed
files (the 9 errors it prints are pre-existing, in `data/multimodal/*`
and `multimodal_train_module.py`).

## Not in this PR / next
- The scaling-ladders switch that runs Run 2's config with
`use_emo=True` and `causal_pool=True` (#83 follow-up).
- A GPU smoke run: loss at Run 2's start, and the step-time overhead of
EMo routing compared with Run 2.
- The full run: 64 GPUs for about 2 days, pending compute from Taira.
Checkpoints go to PT for modularity checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant