Laya on Mac m4 CoreML Offline https://github.com/mizorewww/laya-coreml - laya.sh

178 points•putna•10 days ago•34 comments•

34 comments

imranq10 days ago
Based on my admittedly limited research, it seems like you should use Laya for much more deterministic tasks where you have some training data. It won't be as good as Jev for zero shot cases.
jwpapi10 days ago
I think it can make a lot of sense to make a set with jev and then train laya on that set and do the rest with laya for saving $
adinb10 days ago
I did that on a little macbook m4 last night on my model of the innate immune system—fine tuning took 15m or so. Just wish it had a larger context window
putna10 days ago
agree, too good to be true for one shot cases
speedping10 days ago
So cool. I've fired up pumas (energy monitor) and it seems to run almost fully on the neural engine and not the GPU so it plays really nicely with CoreML
tentacleuno10 days ago
This looks like a local AI model playing Snake -- is that correct? The article offers no explanation.
ryuuseijin10 days ago
The linked github project [1] contains more information.

[1]: https://github.com/mizorewww/laya-coreml

putna10 days ago
Correct, the cli commands are just copy paste to run on your machine.
PaulRobinson10 days ago
Local LLMs are the future, and one of the reasons I think the data centre furore is just going to end in a market crash.

LLMs that can reliably be used for control problems are the future, and I think classic/deep RL has generally been overlooked for years for a whole host of problems by wider industry because it felt inaccessible. The first thing I thought of when I saw Jev (and then Laya), was "this might move the needle in a really, really interesting way".

Local LLMs that can reliably be used for control problems smash through a lot of barriers I'm interested in, and this intrigues me a lot. Guess I'm about to become a big Laya fan if it can run on this kind of hardware to this performance.

ipsi10 days ago
The future for whom? The general public? Not a chance, no way, not unless it's able to run on a phone (anywhere from 20-40% of internet users, world-wide, are phone-only).

For companies? I think that's a lot more plausible, as that's mostly just a question of money - is it cheaper to run and administrate our own models, or outsource that?

For technically inclined users? I think that's unlikely unless they're able to operate on relatively cheap hardware while still being just as good as the hosted models. And by that I don't mean "a mac studio," that's far more money than I think is reasonable. A single RTX 5080, maybe, once memory prices start to drop.

Izmaki10 days ago
Compare the games your average high-end smartphone can run to the AAA titles of the 2010's. It's not a matter of "unless it is able to" but "when it is able to".
frag10 days ago
that's not a local LLM. If it's local, it doesn't matter in this case. Laya is a System 1 "AI", namely works like a classifier, given a state and questions, it shoots probabilities for each. I publish an episode tomorrow about Laya and Typesafe AI on https://www.youtube.com/@DataScienceatHome

Stay tuned ;)

EagnaIonat10 days ago
I’ve found they start to fail the more classifications you have, long before your typical ML classifier.

To me it’s like a solution looking for a problem that is already solved.

putna10 days ago
cool, will check it
bigyabai10 days ago
It won't. Laya is a finetuned version of Google's BeRT model, which is almost 10 years old right now.

If BeRT had any potential to disrupt the datacenter buildout, it already would have.

viraptor10 days ago
Modernbert is from 2024. It's also trained from scratch, not a fine tune.
itemize12310 days ago
no way. one is functionally (slightly overhyped) magic. another is better tool.
altano10 days ago
How much memory does this use of the test machine's (M3 Max) 128 GB unified memory?
WASDx10 days ago
The model is only 0.3B params so probably not much.
ImJasonH10 days ago
I had Fable one-shot the same demo from the same weights on an iPhone 15 Pro and it decides in ~40ms.
putna10 days ago
Physical footprint: 560.4M Physical footprint (peak): 778.0M

Read the full thread on Hacker News →

Related stories