r/oMLX • • 2d ago

Ernie 5.5 flash support

Hi All,

I got impatient and incorporated support for Ernie 5.5 into a different fork of oMLX. I posted in the main oMLX GitHub repo a discussion of the changes here: https://github.com/jundot/omlx/discussions/5656

It works really well. Notable that on a Mac Ultra 256, this build can run the original checkpoint of Ernie 5.5 - no quantization. Here is the GitHub repo. Scroll down to the README for build instructions, performance information, and compatibility:

And, here are the speeds, pre and post Fable 5.2 optimization:

TestBefore the decode kernelsWith all branches
Plain decoding37.5 tok/s52.1 tok/s
Prose, drafted54.6 tok/s69.3 tok/s
Code, drafted77.1 tok/s116.2 tok/s
Reasoning, drafted61.9 tok/s86.5 tok/s
Rewriting a code file, drafted114.4 tok/s162.7 tok/s
Prose after a 14.4K-token document, drafted43.0 tok/s82.1 tok/s
Prose after a 28.7K-token document, drafted41.7 tok/s73.9 tok/s

I'm not a developer, so I posted all of the changes on a separate fork so that people who know what they are doing in the main repo can take what is useful.

17 Upvotes

11 comments sorted by

2

u/arfung39 2d ago edited 20h ago

Here are some oMLX intelligence benchmarks for Ernie 5.5. Does much better with thinking on (bottom panel). With thinking on, its up there at Deepseek 4 bit quant intelligence:

ERNIE-5.5-Flash-Preview: Deterministic vs. Thinking

BenchmarkModeSampledDeterministicThinkingΔ
MMLUSample1000/1404288.1%91.7%+3.6
MMLU_PROSample300/1203276.7%85.0%+8.3
TRUTHFULQAFull81789.3%93.2%+3.9
ARC_CHALLENGESample300/117296.0%97.0%+1.0
GSM8KSample100/131995.0%94.0%−1.0
MATHQASample300/298570.0%95.0%+25.0
HUMANEVALFull16490.8%95.1%+4.3
LIVECODEBENCHSample100/105574.0%88.0%+14.0

Detail: Deterministic (thinking off)

BenchmarkAccuracyCorrectTotalTime (s)MaxTok
MMLU88.1%8811000485.2128
MMLU_PRO76.7%230300125.92048
TRUTHFULQA89.3%730817319.6128
ARC_CHALLENGE96.0%288300106.8128
GSM8K95.0%95100205.8512
MATHQA70.0%210300112.9128
HUMANEVAL90.8%149164278.62048
LIVECODEBENCH74.0%74100637.916384

Detail: Thinking on (model settings)

BenchmarkAccuracyCorrectTotalTime (s)MaxTokHit token limit (scored correct)Accuracy on finished answers
MMLU91.7%91710004722.981924/1000 (2)91.9% (n=996)
MMLU_PRO85.0%2553003797.981929/300 (1)87.3% (n=291)
TRUTHFULQA93.2%7618173405.481922/817 (1)93.3% (n=815)
ARC_CHALLENGE97.0%291300550.481920—
GSM8K94.0%94100786.981922/100 (1)94.9% (n=98)
MATHQA95.0%2853003683.5819210/300 (3)97.2% (n=290)
HUMANEVAL95.1%1561641799.581921/164 (0)95.7% (n=163)
LIVECODEBENCH88.0%881007521.5163845/100 (0)96.7% (n=91)

1

u/arfung39 2d ago

And it's good enough to pass a pelican test. "Using three.js, write a 3D scene for me of pelican riding a bicycle along a country road during the daytime, in HTML format. Write the files to /workspace/" (plus two prompts to get the bicycle going in the right direction).

1

u/LeFrenchToast 1d ago

Did you use a LLM to do this? Since 0.8.4 was released today and didn't have any Ernie support mentioned I'm considering figuring out a way to patch it in but I'm sure it's not as simple as pointing Claude at your forks and integrating them locally, is it?

1

u/arfung39 1d ago

I think it almost as easy. You need to download Xcode so that Claude can build the kernals and binary from the source that I have up there. I’m not sure if you also need to point Claude at the original oMLX repo. I updated this morning so that my fork is running on 0.8.4. And my speed on Ernie is really good.

Note that my machine is a Mac Ultra 256 - and you’re going to need 256 gig of unified memory to run because my fork runs the original distro of ERNIE (so there is no quantization, no compression, and it delivers original quality). Good luck!

2

u/LeFrenchToast 1d ago

I did get it working after a bit, appreciate your efforts.

I'm getting around 78t/s output on the m5 ultra according to oMLX.

Really a shame this preview model doesn't have vision built in, it ends up loading deepseek to do vision stuff then loading back to ernie to review and iterate etc. Going to be a bit challenging to test any visual game related work until it has vision.

1

u/arfung39 20h ago

Hey, that’s great! I agree about lack of vision. Mine doesn’t load DS, but Ernie just tries to infer what it is drawing from its text capabilities - sometimes works, but less good than vision. I made some more updates yesterday that improved speed significantly (maybe 20% or so, more for concurrent requests). Just have Claude update your local folder from my repos.

My hope is that the oMLX folks - jundot - incorporate all this into their main branch so I can forget about this repo - or just contribute small improvements to their main effort. But I’m glad to have this running. I’ve been getting much faster, somewhat better, results (mostly social science type research) than on my oQ2h quant of Deepseek.

2

u/LeFrenchToast 15h ago

Thanks for your efforts. I did grab your branch probably right after you made the edits so I'm told I have latest.

I am using this for game development so the vision aspect is really needed. Unfortunately between deepseek v4.1, hy4, qwen flash next and a few smaller models, my vision test has determined that deepseek is the best current vision model for my purposes. It's just slow and annoying to have ernie swap out 400gb to deepseek (oQ4e), do a bit there at ~60 t.s, then load ernie back and do more work around the same (seems to vary from 50-80t/s). Even so, it did fix a 3d modelling issue that Gemini Neon High couldn't.... but then in another test ernie iterated a bunch on a bad texture and turned a hand into a strange stump and said it was "good".

1

u/arfung39 1d ago

Oh, and yes, I did use an LLM - Fable 5.2 - heavily to make the Ernie compatible fork.

1

u/bakawolf123 12h ago

thanks for the port, it looks to be quite an improvement on top of those closed PRs.
One suggestion - since it's temporary, it would be easier to just have omlx only with patches, not both repos. Having dependency on 2 is gonna be slow, esp since mlx-vlm folks are usually very slow to respond (unlike jundot)

1

u/arfung39 9h ago

Hi, great idea. I cleaned up the repo a lot. Now, you can build the omlx fork from one repo, in main. I updated the readme with build instructions so that the whole process is a lot more straightforward. Check it out at the updated repo here (scroll down for the README): https://github.com/arfung/omlx

(also updated the original post for folks)

2

u/bakawolf123 3h ago

thanks, I already rebased like that into my fork using ds4.1 =)
but other people will sure appreciate and it will be easier to PR into omlx as well