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

Why this mario gpt script is laggy? #30

Open
DrFrankatron opened this issue Mar 13, 2024 · 3 comments
Open

Why this mario gpt script is laggy? #30

DrFrankatron opened this issue Mar 13, 2024 · 3 comments

Comments

@DrFrankatron
Copy link

This is the script:

from mario_gpt import MarioLM

mario_lm = MarioLM()

prompts = ["many pipes, many enemies, some blocks, high elevation"]

generated_level = mario_lm.sample(
prompts=prompts,
num_steps=100,
temperature=2.0,
use_tqdm=True
)

play in interactive

generated_level.play()

run Astar agent

generated_level.run_astar()

And I need more num_steps, but the AI lags when it reach more than 100 steps... its possible to get performance with this python library?

@DrFrankatron
Copy link
Author

This is my code, sorry the bad formatted previous one:

from mario_gpt import MarioLM

mario_lm = MarioLM()

prompts = ["many pipes, many enemies, some blocks, high elevation"]

generated_level = mario_lm.sample(
prompts=prompts,
num_steps=100,
temperature=2.0,
use_tqdm=True
)

generated_level.play()

generated_level.run_astar()

@shyamsn97
Copy link
Owner

Hey! Are you sure you’re using a gpu? It can be pretty slow without one. Basically has the steps increase the information in the context increases.

@shyamsn97
Copy link
Owner

You can check with torch.cuda.is_available()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants