Repository navigation
fix(server): load snowflake-arctic-embed-m-v2.0 without xformers - #813
Merged
Merged
Conversation
The checkpoint's config turns on the remote code's xformers memory-efficient attention and unpadded inputs, and the remote code asserts that xformers is installed. The CUDA images do not ship xformers, so the model failed to load with "please install xformers". Load it with use_memory_efficient_attention and unpad_inputs turned off, the same config_kwargs stella_en_400M_v5 already uses for the same attention code. The remote code then runs exact attention over padded inputs, and its cosine scores for the model card's example match the published reference (0.327198 and 0.069602 against 0.327198 and 0.069601). The real-weight test now pins the model's output instead of expecting it to fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snowflake/snowflake-arctic-embed-m-v2.0does not load in the published 0.10.1cuda12-defaultimage. It fails withAssertionError: please install xformers, and the compatibility matrix for 0.10.1 records the profile as unsupported for this reason.Cause. The checkpoint ships its own GTE modeling code, and its
config.jsonsetsuse_memory_efficient_attentionandunpad_inputsto"true". With those settings the code builds its attention onxformers.ops.memory_efficient_attentionand asserts that xformers is importable. The server images do not ship xformers. The same failure happens on CPU, so the cause is in the profile, not the GPU.Fix. The profile now passes
config_kwargswith both settings off.NovaSearch/stella_en_400M_v5already does this for the same attention code. The remote code then uses its exact eager/SDPA attention over padded inputs. No image dependency changes. Adding xformers to the images would add a CUDA-only, torch-version-coupled package to every default-lane image for one model.Class sweep. I fetched
config.jsonat the pinned revision for every catalog checkpoint, 213 in all. 36 have noconfig.json(GLiNER-style checkpoints) or are gated, and none of those use this modeling code. Exactly two checkpoints turn on memory-efficient attention:NovaSearch/stella_en_400M_v5, which already turns it off.Validation.
test_all_models.py::test_snowflake_snowflake_arctic_embed_m_v2_0_denseloads the real checkpoint throughload_model_configsandload_adapteron CPU. Before the change it fails withAssertionError: please install xformers, as the image does. With the change it loads and encodes. The test now pins the first output values instead of being marked as an expected failure.what is snowflake?againstThe Data Cloud!andMexico City of Course!) scores0.327198and0.069602. The model card's published reference is0.32719788and0.06960141.packages/sie_server/tests/configsuite passes. Ruff and ruff format pass.