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

Optimize memory and improve code #7

Merged
merged 1 commit into from
Dec 8, 2024
Merged

Conversation

salcc
Copy link
Member

@salcc salcc commented Dec 7, 2024

  • Only move data to the device if needed.
  • Use batching in inference (predict_proba) to avoid OOM error in CUDA.
  • Add nn_bias_mini_batches option to control batching in NN bias.
  • Add weights_only=True to torch.load to fix PyTorch warning.
  • Minor code improvements.

@davidbonet
Copy link
Member

Thank you for these improvements!

@davidbonet davidbonet merged commit 7c1331f into AI-sandbox:main Dec 8, 2024
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

Successfully merging this pull request may close these issues.

2 participants