Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Hemil Desai <[email protected]>
  • Loading branch information
hemildesai committed Dec 1, 2024
1 parent 2f68efe commit 5b2a6bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion nemo/collections/llm/gpt/model/llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,10 @@ def apply(self, output_path: Path) -> Path:

target = target.cpu()
target.save_pretrained(output_path)
self.tokenizer.save_pretrained(output_path)
try:
self.tokenizer.save_pretrained(output_path)
except Exception:
logging.warning("Failed to save tokenizer")

return output_path

Expand Down
2 changes: 1 addition & 1 deletion nemo/lightning/io/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def nemo_load(
from nemo.lightning import MegatronStrategy, Trainer, _strategy_lib
from nemo.lightning.io.api import load_context

model = load_context(path).model
model = load_context(path, subpath="model")
_trainer = trainer or Trainer(
devices=1,
accelerator="cpu" if cpu else "gpu",
Expand Down

0 comments on commit 5b2a6bc

Please sign in to comment.