-
Notifications
You must be signed in to change notification settings - Fork 189
Bloom custom ckpt files, improved model path support, MII refactor, flake8, etc. #43
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b928e9b
task specific parsing in score file
jeffra 0f17585
allow relative aml model path
jeffra 2ea829e
stash bloom ckpt json in mii-cache path
jeffra 77d377d
big refactor + pre-commit hooks
jeffra adf77b2
flake8
jeffra f12fc32
resolving flake8 errors
mrwyattii 0c51251
fix param name in tests
mrwyattii e663722
support client side passing of ckpt dict
jeffra bf18e91
Merge branch 'task-specific-score' of github.com:microsoft/DeepSpeed-…
jeffra 24f2ae3
formatting
jeffra 37bc9d3
Update mii/utils.py
jeffra 75fdf98
address comments
jeffra 27cc276
Merge branch 'task-specific-score' of github.com:microsoft/DeepSpeed-…
jeffra 30a34b6
address comments
jeffra a6022cc
remove unnecessary code
jeffra 9bcf8bd
fixes
jeffra 79a47c9
fix for zero
jeffra bdaa0d3
install deepspeed in cpu tests
jeffra 80be59e
remove leftover debug code
jeffra 1bc72a0
add aml bloom example
jeffra 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import mii | ||
|
|
||
| mii_configs = { | ||
| "dtype": "fp16", | ||
| "tensor_parallel": 8, | ||
| "port_number": 50050, | ||
| "checkpoint_dict": { | ||
| "checkpoints": [f'bloom-mp_0{i}.pt' for i in range(0, | ||
| 8)], | ||
| "parallelization": "tp", | ||
| "version": 1.0, | ||
| "type": "BLOOM" | ||
| } | ||
| } | ||
| name = "bigscience/bloom" | ||
|
|
||
| mii.deploy(task='text-generation', | ||
| model=name, | ||
| deployment_name=name + "_deployment", | ||
| deployment_type=mii.constants.DeploymentType.AML, | ||
| mii_config=mii_configs) |
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,12 @@ | ||
| import mii | ||
|
|
||
| mii_configs = { | ||
| "tensor_parallel": 1, | ||
| "dtype": "fp16", | ||
| "aml_model_path": "models/bloom-350m" | ||
| } | ||
| mii.deploy(task='text-generation', | ||
| model="bigscience/bloom-350m", | ||
| deployment_name="bloom350m_deployment", | ||
| deployment_type=mii.constants.DeploymentType.AML, | ||
| mii_config=mii_configs) |
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 |
|---|---|---|
| @@ -1,7 +1,3 @@ | ||
| from email import generator | ||
| import os | ||
| import grpc | ||
|
|
||
| import mii | ||
|
|
||
| # gpt2 | ||
|
|
||
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 |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| import os | ||
| import grpc | ||
|
|
||
| import mii | ||
|
|
||
| # roberta | ||
|
|
||
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 |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| import os | ||
| import grpc | ||
|
|
||
| import mii | ||
|
|
||
| name = "deepset/roberta-large-squad2" | ||
|
|
||
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 |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| import os | ||
| import grpc | ||
|
|
||
| import mii | ||
|
|
||
| # gpt2 | ||
|
|
||
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 |
|---|---|---|
| @@ -1,10 +1,21 @@ | ||
| import mii | ||
|
|
||
| mii_configs = {"dtype": "fp16", "tensor_parallel": 8} | ||
| mii_configs = { | ||
| "dtype": "fp16", | ||
| "tensor_parallel": 8, | ||
| "port_number": 50950, | ||
| "checkpoint_dict": { | ||
| "checkpoints": [f'bloom-mp_0{i}.pt' for i in range(0, | ||
| 8)], | ||
| "parallelization": "tp", | ||
| "version": 1.0, | ||
| "type": "BLOOM" | ||
| } | ||
| } | ||
| name = "bigscience/bloom" | ||
|
|
||
| mii.deploy(task='text-generation', | ||
| model=name, | ||
| deployment_name=name + "_deployment", | ||
| local_model_path="/tmp/huggingface/transformers/", | ||
| model_path="/data/bloom-mp", | ||
| mii_config=mii_configs) |
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 |
|---|---|---|
| @@ -1,6 +1,3 @@ | ||
| import os | ||
| import grpc | ||
|
|
||
| import mii | ||
|
|
||
| # roberta | ||
|
|
||
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 |
|---|---|---|
| @@ -1,13 +1,8 @@ | ||
| import enum | ||
| import grpc | ||
| from .server_client import MIIServerClient, mii_query_handle | ||
| from .deployment import deploy | ||
| from .terminate import terminate | ||
| from .config import MIIConfig | ||
| from .constants import DeploymentType, Tasks | ||
|
|
||
| from .utils import get_model_path, import_score_file, set_model_path | ||
| from .utils import setup_task, get_task, get_task_name, check_if_task_and_model_is_supported, check_if_task_and_model_is_valid | ||
| from .config import MIIConfig | ||
| from .grpc_related.proto import modelresponse_pb2_grpc | ||
| from .grpc_related.proto import modelresponse_pb2 | ||
| from .models.load_models import load_models |
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,2 @@ | ||
| from .score import create_score_file | ||
| from .load_models import load_models |
This file was deleted.
Oops, something went wrong.
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.