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

Add utilities to distributions #1583

Open
noahfarr opened this issue Nov 12, 2024 · 2 comments
Open

Add utilities to distributions #1583

noahfarr opened this issue Nov 12, 2024 · 2 comments
Labels
enhancement New feature or request low priority

Comments

@noahfarr
Copy link
Contributor

In pytorch, the following is easily possible:

logits = ...
probs = Categorical(logits=logits)
log_prob = probs.log_prob(value)
entropy = probs.entropy()

but when I want to achieve something similar in MLX, I have to manually calculate the log_prob and entropy. Is it possible to add support for these methods as it makes working with distributions in MLX much more convenient (at least for me)

@awni
Copy link
Member

awni commented Nov 12, 2024

We don't have a distributions package in the same way the PyTorch does and don't currently have a plan yet to add one to MLX core.

We can keep this issue open to gauge priority.. but for now it's not likely something we will implement in the near future. A good short-term strategy is to encourage a third party development of mlx-distributions or something.

@awni awni added low priority enhancement New feature or request labels Nov 12, 2024
@noahfarr
Copy link
Contributor Author

Thanks for your quick response :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
None yet
Development

No branches or pull requests

2 participants