-
Notifications
You must be signed in to change notification settings - Fork 197
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
Feat (brevitas_examples/llm): remove dependencies from optimum-amd #1094
base: dev
Are you sure you want to change the base?
Conversation
from .data import get_wikitext2 | ||
|
||
|
||
class DatasetToDevice(torch.utils.data.Dataset): |
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.
Lic.
|
||
|
||
@torch.no_grad() | ||
def recursive_to_device(tensor_or_iterable: Union[Iterable, torch.Tensor], device) -> None: |
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.
Lic.
|
||
|
||
@torch.no_grad() | ||
def compute_perplexity( |
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.
Lic.
@@ -16,6 +16,10 @@ | |||
limitations under the License. | |||
""" |
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.
Old licence still necessary? Seems the entire contents of this file have changed...
data_files={"validation": "en/c4-validation.00000-of-00008.json.gz"}, | ||
) | ||
|
||
if fuse_sequences: |
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 think this part as well.
Please also remove |
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.
Remove single unused import. I think the rest are required.
accelerate | ||
datasets | ||
onnx | ||
onnx-tools |
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.
onnx-tools
not required?
Reason for this PR
Remove circular dependencies between brevitas and optimum-amd
Changes Made in this PR
Brevitas now implements all the functions required for the LLM entrypoint.
Testing Summary
Risk Highlight
Checklist
dev
branch.