-
Notifications
You must be signed in to change notification settings - Fork 606
Support SDAR #3922
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
Open
grimoire
wants to merge
37
commits into
InternLM:main
Choose a base branch
from
grimoire:support-SDAR
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,444
−665
Open
Support SDAR #3922
Changes from 24 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
07c667c
refactor SchedulerSequence
grimoire af01586
block sparse attn
grimoire e6e440d
Merge branch 'refactor-seqs' into support-SDAR
grimoire 4301864
Merge branch 'block-sparse-attn' into support-SDAR
grimoire e328c5d
support SDAR
grimoire 63efa34
Merge branch 'main' into support-SDAR
grimoire 48a0137
fix max_new_tokens;update profiler
grimoire 6e8f4c5
add args
grimoire 42f4582
fix multiround stop words
grimoire 9a68f1a
fix sampling step
grimoire 0fa2e7e
optimize position_ids
grimoire 85255d2
fix long context
grimoire b65afc5
fix vlm
grimoire da2f403
fix stopping
grimoire e6b5bdd
move args into logitsprocessor
grimoire 2b0e607
rename
grimoire f7c7cd8
Merge branch 'main' into support-SDAR
grimoire a660a43
fix pd
grimoire b23d962
rename
grimoire 34e41aa
strategy + abstruct factory
grimoire de49bb5
update seqs
grimoire 3890cfe
add moe support
grimoire c1e4cde
bind block length
grimoire d9d688c
solve conflict
grimoire 26f4c2d
fix num loops
grimoire 11674bf
enum unmasking type
grimoire 8fce74a
typo fixing
grimoire 94c3013
warning
grimoire c74b535
fix metric
grimoire bbd1489
limit batch size
grimoire 11d3c2e
merge main
grimoire cc67ff6
merge main
grimoire e8771be
rename field;comment unmasking strategy
grimoire 59c7c62
suppression warning
grimoire c0165df
solve conflict
grimoire 1e47c31
colored vis
grimoire ee71d91
fix dummy
grimoire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) OpenMMLab. All rights reserved. | ||
from .default import AutoModelConfigBuilder, DefaultModelConfigBuilder | ||
|
||
|
||
class SDARModelConfigBuilder(AutoModelConfigBuilder): | ||
|
||
@classmethod | ||
def condition(cls, hf_config): | ||
"""config.""" | ||
return hf_config.model_type in ['sdar', 'sdar_moe'] | ||
|
||
@classmethod | ||
def build(cls, hf_config, model_path: str = None, **kwargs): | ||
"""build.""" | ||
cfg = DefaultModelConfigBuilder.build(hf_config, model_path, **kwargs) | ||
cfg.dllm_mask_token = 151669 | ||
lvhan028 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cfg.model_paradigm = 'dllm' | ||
cfg.dllm_block_length = 4 | ||
RunningLeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return cfg |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) OpenMMLab. All rights reserved. | ||
# dllm | ||
DLLM_MASKED = 0 | ||
DLLM_UNMASKED = 1 | ||
DLLM_CACHED = 2 |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.