-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Add Code World Model (CWM) #41199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Code World Model (CWM) #41199
Conversation
zucchini-nlp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, left some comments to clean up. Btw, do we have converted weights already which we can use for the integration tests?
|
Can we update slow test ids and then I will trigger the slow CI? Overall lgtm and we can merge |
|
run-slow: cwm |
|
This comment contains run-slow, running the specified jobs: models: ['models/cwm'] |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
ArthurZucker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM I think you can completely inherit from Qwen2Model tho
ArthurZucker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go! 🤗
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, cwm |
Pull Request is not mergeable
* [wip][cwm] Code World Model stubs and setup in HF Transformers * [wip] Get other things working * [wip] Working * Tokenizer pad * fix: cwm window attn * temp remove test * temp remove test * Fixes * Temporarily add auto config remapping option until VLLM 0.11 is out * Fix model type and add layer validation * Lint, remove CwmForSequenceClassification * Lint, tests * Remove CwmForSequenceClassification * Lint * Remove intermediary layer expors/doc errorss, fix tests * Lint * run python utils/sort_auto_mappings.py --check_only * Remove Cwm processor mapping, get check_repo passing * Remove CwmTextConfig from test * Add docstring for CwmConfig * remove global_window and window_pattern params from config * Fix docstrings * Revert change to auto docstring util * lint * Fixes minus test improvements * Alter tests to simply check logits * lint * Have slow tests use repo, make CwmPretrainedModel passthrough * Remove decoder layer implementation, use Llama3Decoder + CwmAttetion * Use linear w/o bias for CwmAttention, add token-level integration test * Don't ignore config attention bias * Remove attention bias parameter entirely from config --------- Co-authored-by: galco <[email protected]>
Adds the Code World Model (CWM) - https://ai.meta.com/research/publications/cwm-an-open-weights-llm-for-research-on-code-generation-with-world-models/
High-level implementation details:
The model repos are:
Note that for VLLM compatibility, model
config.jsonstill refer toLlama3ForCausalLMand allamamodel_type— see example. vllm-project/vllm#25611 adds support mappingCwmForCausalLMto the Llama3 model class in VLLM since VLLM supportsLlama3+layer_typeswith local/global attention - see docs. The model type in theconfig.jsonwill be updated on HF (and the special automapping condition removed) once this PR is merged and a Transformers release has happened containing theCwmForCausalLMmodel class.@ArthurZucker, @zucchini-nlp
Supersedes #41188 due to some fork misery