Skip to content

Conversation

yebai
Copy link
Member

@yebai yebai commented Aug 14, 2025

Mooncake's performances are consistently better after switching to product_distribution from filldist / arraydist.

Before the change (results on main)

image

After the change

image

@yebai
Copy link
Member Author

yebai commented Aug 14, 2025

@penelopeysm, the model is not optimised for performance, but removes some heuristics from the early days of Julia and Turing

@yebai yebai force-pushed the main branch 4 times, most recently from 5baa45f to ff99b21 Compare August 14, 2025 19:37
replace `filldist` with `product_distribution`
@yebai yebai changed the title Reimplement dppl_logistic_regression using product_distribution replace filldist with product_distribution Aug 14, 2025
@yebai yebai requested a review from penelopeysm August 14, 2025 20:09
@yebai
Copy link
Member Author

yebai commented Aug 14, 2025

This is ready for reviewing. Mooncake's performance is generally better with product_distribution, which is nice.

@penelopeysm
Copy link
Member

penelopeysm commented Aug 15, 2025

Thanks Hong. I'm mildly concerned about the use of product_distribution(fill(...)) over filldist. The latter is generally more performant because it uses lazy arrays and so even though the grad / primal ratio looks better, I wonder if it is masking some sins. In general from the comparison you posted here, it seems that Mooncake does much better on strict arrays rather than lazy arrays so I wonder if there is some performance optimisation on lazy arrays that will help to bring the performance down on filldist. Many people still use filldist (indeed it's pretty much everywhere on our docs page / code examples out there) so I think it's not unreasonable for people to want Mooncake to perform well on it.

In any case I don't consider this to be a problem for ADTests because the model definition is shown on the website so all this information is given upfront, so will merge.

@penelopeysm penelopeysm merged commit 1565acf into main Aug 15, 2025
53 checks passed
@penelopeysm penelopeysm deleted the yebai-patch-1 branch August 15, 2025 00:03
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