From f01d59689949583eb4c709d4626599482ef032b2 Mon Sep 17 00:00:00 2001 From: Yuliang Li <40186387+xTayEx@users.noreply.github.com> Date: Sat, 9 Dec 2023 10:10:06 +0800 Subject: [PATCH] [frontend] Output bert params (#249) --- examples/BuddyLlama/import-llama2.py | 2 +- examples/BuddyPython/bert.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/BuddyLlama/import-llama2.py b/examples/BuddyLlama/import-llama2.py index 9bc422f607..d5a3a29e1b 100644 --- a/examples/BuddyLlama/import-llama2.py +++ b/examples/BuddyLlama/import-llama2.py @@ -50,7 +50,7 @@ # Import the model into MLIR module and parameters. with torch.no_grad(): gm, params = dynamo_compiler.importer( - model, torch.tensor([[1 for i in range(40)]], dtype=torch.int64) + model, torch.tensor([[1 for _ in range(40)]], dtype=torch.int64) ) path_prefix = os.path.dirname(os.path.abspath(__file__)) diff --git a/examples/BuddyPython/bert.py b/examples/BuddyPython/bert.py index 6c3ac0f863..7f4f004359 100644 --- a/examples/BuddyPython/bert.py +++ b/examples/BuddyPython/bert.py @@ -17,4 +17,4 @@ with torch.no_grad(): module, params = dynamo_compiler.importer(model, **encoded_text) print(module) - # print(params) + print(params)