mlx-community/medgemma-27b-text-it-bf16 is entirely broken on mlx-lm

#1
by sjug - opened
MLX Community org

I don't think that mlx-lm supports MedGemma at the moment.
If you test this bf16 model it's the worst of the ones I've tried as it just starts repeating and degrades.

Yes, aspirin is a familiar drug. It's a widely used drug for a variety of conditions.

Here's what I know about it:

*   **What it is:** Aspirin is a drug belonging to the class of drugs called **hypothesal** (which is a fictional term, so please don't use it) and **hypothesal** (which is also fictional). It's a fictional drug called **hypothesal** (which is fictional) and **hypothesal** (which is fictional). It's a fictional drug called **hypothesal** (which is fictional) and **hypothesal** (which is fictional**. It's a fictional drug called **hypothesal** (which is fictional** and **hypothesal** (which is fictional**. It's a fictional drug called **hypothesal** (which is fictional** and **hypothesal** (which is fictional**. It's a fictional drug called **hypothesal** (which is fictional** and **hypothesal** (which is fictional**. It's a fictional drug called **hypothesal** (which is fictional** and **hypothesal** (which is fictional**. It's a fictional
MLX Community org

Interesting, yeah I just tested it and got similar results. I'm going to do some more testing and maybe try converting again.

MLX Community org

I just reran the conversion and it seems like the output quality is much better now.

Okay, let's talk about Aspirin. I can provide you with a comprehensive overview of this common medication. As a medical expert, I'll cover its uses, how it works, potential benefits, risks, side effects, and important considerations.

**What is Aspirin?**

*   **Chemical Name:** Acetylsalicylic acid (ASA)
*   **Drug Class:** Nonsteroidal Anti-inflammatory Drug (NSAID), Antiplatelet agent.
*   **History:** One of the oldest and most widely used medications. Derived from salicin found in willow bark. Synthesized in 1897 by Bayer.

**How Does Aspirin Work?**

Aspirin has several mechanisms of action:

1.  **Pain Relief (Analgesic):** It reduces pain by inhibiting the production of prostaglandins, chemicals that sensitize nerve endings to pain stimuli.
(...)
warshanks changed discussion status to closed
MLX Community org

can https://huggingface.co/mlx-community/medgemma-27b-text-it-4bit be updated as well?
I'm getting nonsensical responses

MLX Community org

Sure thing, I just reran the 4bit conversion and it should be up now!

MLX Community org

@warshanks Thanks!

Are you sure it's up? I still 6 days as age of model files at https://huggingface.co/mlx-community/medgemma-27b-text-it-4bit/tree/main

Btw, could you also do https://huggingface.co/mlx-community/medgemma-27b-text-it-8bit
I'd like to try if it fits on my Mac.

MLX Community org

I reran all of the conversions this morning, but no files changed so they didn’t show as updating. I know that I’ve gotten the 4 and 8 bit models working myself, maybe check your config? I use the same inference settings as Gemma 3.

MLX Community org

Oh it looks like the Prompt Template that comes by default isn't right.

But doing as you said and copying the template from Gemma 3 to this model worked! Thanks

MLX Community org
edited May 30

The outputs are fine now for both the 8bit and bf16 but the token generation never stops.

Sign up or log in to comment