It's probably something from Marvell or that tier of vendor, if I had to guess. I don't see any Marvell Prestera ASICs with 24+ 10G ports plus a few 25G ports, though. They sell chips that can so 24+ 25G ports, and chips that can do 24+ 10G ports but no 25G ports. They *might* be playing games with 40G->25G converters, but I doubt that's really cost-effective.
In general though, ~no switches support alternate OSes. The exceptions are (a)
switches that SONiC supports (but I would *strongly* recommend against going down that road in general), (b) a handful of whitebox switches designed for ONIE and friends (but they generally need explicit support per switch), and (c) switch ASICs w/ switchdev support in the Linux kernel (mostly just Mellanox spectrum).
Switches in lists (b) and (c) are largely also covered in list (a).
The only really *interesting* "I ran a different OS on my switch and it was usable" story that I've seen is from
Pim van Pelt, where he used Debian on a Mellanox SN2700 and was able to get ~full functionality, although without a particularly useful UI.
In any case, that's a *long* way from Ubiquiti's usual market.
It's usually possible to use Unifi gear by sshing into it and running `cli`, which will give you an undocumented Cisco-ish UI, but I wouldn't trust it not to lose configs or actually work correctly, as that's not really how they intend their switches to be used.