-
Notifications
You must be signed in to change notification settings - Fork 36
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 T5 LM v1.1 encoder #550
Changes from all commits
5652694
7c76346
5f69f94
c55fccf
e93864a
fa0360f
cb461b3
2c910c2
5b182c9
3ecea81
78801cb
82bcdcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,6 +88,16 @@ def pytest_addoption(parser): | |
help="Enable all llama benchmarking tests", | ||
) | ||
|
||
parser.addoption( | ||
"--with-t5-data", | ||
action="store_true", | ||
default=False, | ||
help=( | ||
"Enable tests that use T5 data like models that is not a part of the source " | ||
"code. The user is expected to provide the data" | ||
), | ||
) | ||
|
||
# TODO: Remove all hardcoded paths in CI tests | ||
parser.addoption( | ||
"--llama3-8b-tokenizer-path", | ||
|
@@ -133,6 +143,28 @@ def pytest_addoption(parser): | |
help="Llama3.1 405b fp8 model path", | ||
) | ||
|
||
# To obtain a T5 GGUF file you can use llama.cpp's convert_hf_to_gguf.py. | ||
# https://github.com/ggerganov/llama.cpp/blob/9abe9eeae98b11fa93b82632b264126a010225ff/convert_hf_to_gguf.py | ||
# E.g. | ||
# git lfs install | ||
# git clone https://huggingface.co/google/t5-v1_1-small | ||
# convert_hf_to_gguf.py \ | ||
# --outfile t5-v1_1-small.gguf \ | ||
# --outtype=f32 \ | ||
# t5-v1_1-small | ||
parser.addoption( | ||
"--google-t5-v1-1-small-fp32-model-path", | ||
type=Path, | ||
default="/data/t5/small/google__t5-v1_1-small_fp32.gguf", | ||
help="Google T5 v1.1 small fp32 model path", | ||
) | ||
parser.addoption( | ||
"--google-t5-v1-1-xxl-fp32-model-path", | ||
type=Path, | ||
default="/data/t5/xxl/google__t5-v1_1-xxl_fp32.gguf", | ||
help="Google T5 v1.1 XXL fp32 model path", | ||
) | ||
|
||
parser.addoption( | ||
"--baseline-perplexity-scores", | ||
type=Path, | ||
|
@@ -256,6 +288,16 @@ def get_model_artifacts(request: FixtureRequest): | |
model_path["llama3_405b_fp8_model_path"] = set_fixture_from_cli_option( | ||
request, "--llama3-405b-fp8-model-path", "llama3_405b_fp8_model" | ||
) | ||
model_path["google__t5_v1_1_small_fp32_model_path"] = set_fixture_from_cli_option( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need 2 separate model_path flags for small vs xxl models instead of just calling this twice from our tests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This follows the already accepted nomenclature for the Llama variants. I think we will get a lot more variants like fp16 and other quantizations. |
||
request, | ||
"--google-t5-v1-1-small-fp32-model-path", | ||
"google__t5_v1_1_small_fp32_model", | ||
) | ||
model_path["google__t5_v1_1_xxl_fp32_model_path"] = set_fixture_from_cli_option( | ||
request, | ||
"--google-t5-v1-1-xxl-fp32-model-path", | ||
"google__t5_v1_1_xxl_fp32_model", | ||
) | ||
return model_path | ||
|
||
|
||
|
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.
We don't hardcode any llama model/tokenizer paths anymore here. You can pass it as an arg directly to pytest.
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.
Why not have a default that allows you to
pytest sharktank/tests
if you have data at default paths?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.
For someone running these tests on a machine that does not have the data in the default paths we should have at least a comment with a link or something for how/where to get this data
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.
I added a comment.