Skip to content
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

llm.import_ckpt cannot run directly #11756

Open
LingxiaoShawn opened this issue Jan 4, 2025 · 0 comments
Open

llm.import_ckpt cannot run directly #11756

LingxiaoShawn opened this issue Jan 4, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@LingxiaoShawn
Copy link

When I run the following code directly, it seems there is a deadlock inside with spawn multiple processes. The follow code is exactly the same as just use llm.import_ckpt directly as a main function.

from nemo.collections import llm
import nemo_run as run

ckpt_import = run.Partial(
    llm.import_ckpt,
    model=run.Config(llm.LlamaModel, config=run.Config(llm.Llama31Config8B)),
    source=f'hf://{model_path}',
    overwrite=True,  
)
local_executor = run.LocalExecutor()
run.run(ckpt_import, executor=local_executor, direct=True)

However, if I remove direct=True, and use the local_executor to run the importer, the checkpoint can be successfully transformed.

run.run(ckpt_import, executor=local_executor) # can sucess

Can you let me know whether this behavior is expected or there is a bug within the ModelConnector?

Thank you!

@LingxiaoShawn LingxiaoShawn added the bug Something isn't working label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant