Text Generation
MLX
Safetensors
mlx-lm
qwen3
qwen3-next
mixture-of-experts
quantized
4-bit precision
6-bit
8-bit precision
apple-silicon
Instructions to use chanderbalaji/Grug-35B-A3B-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use chanderbalaji/Grug-35B-A3B-MLX with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("chanderbalaji/Grug-35B-A3B-MLX") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use chanderbalaji/Grug-35B-A3B-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "chanderbalaji/Grug-35B-A3B-MLX" --prompt "Once upon a time"
Add files using upload-large-folder tool
Browse files
README.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pipeline_tag: text-generation
|
| 3 |
+
library_name: mlx
|
| 4 |
+
license: other
|
| 5 |
+
base_model: kai-os/Grug-35B-A3B
|
| 6 |
+
base_model_relation: quantized
|
| 7 |
+
tags:
|
| 8 |
+
- mlx
|
| 9 |
+
- mlx-lm
|
| 10 |
+
- qwen3
|
| 11 |
+
- qwen3-next
|
| 12 |
+
- mixture-of-experts
|
| 13 |
+
- text-generation
|
| 14 |
+
- quantized
|
| 15 |
+
- 4-bit
|
| 16 |
+
- 6-bit
|
| 17 |
+
- 8-bit
|
| 18 |
+
- apple-silicon
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Grug-35B-A3B MLX
|
| 22 |
+
|
| 23 |
+
Apple Silicon MLX quantizations of
|
| 24 |
+
[`kai-os/Grug-35B-A3B`](https://huggingface.co/kai-os/Grug-35B-A3B), packaged
|
| 25 |
+
as a single Hugging Face repo with one folder per quantization level.
|
| 26 |
+
|
| 27 |
+
This repository contains MLX safetensors folders, not GGUF files. The source
|
| 28 |
+
model remains in the upstream Hugging Face repository.
|
| 29 |
+
|
| 30 |
+
## Available variants
|
| 31 |
+
|
| 32 |
+
| Variant | Folder | Quantization | Size | Best fit |
|
| 33 |
+
| --- | --- | --- | ---: | --- |
|
| 34 |
+
| MLX 8-bit | `mlx-8bit/` | affine, group size 64 | 34 GB | Highest-quality local MLX run. |
|
| 35 |
+
| MLX 6-bit | `mlx-6bit/` | affine, group size 64 | 26 GB | Balanced memory and quality. |
|
| 36 |
+
| MLX 4-bit | `mlx-4bit/` | affine, group size 64 | 18 GB | Smallest footprint and easiest local run. |
|
| 37 |
+
|
| 38 |
+
Benchmarks will be added later.
|
| 39 |
+
|
| 40 |
+
## Usage
|
| 41 |
+
|
| 42 |
+
Download only the variant you want:
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
from pathlib import Path
|
| 46 |
+
from huggingface_hub import snapshot_download
|
| 47 |
+
|
| 48 |
+
repo_id = "chanderbalaji/Grug-35B-A3B-MLX"
|
| 49 |
+
variant = "mlx-4bit"
|
| 50 |
+
|
| 51 |
+
snapshot = snapshot_download(
|
| 52 |
+
repo_id,
|
| 53 |
+
allow_patterns=[f"{variant}/*"],
|
| 54 |
+
)
|
| 55 |
+
model_path = Path(snapshot) / variant
|
| 56 |
+
print(model_path)
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Run with `mlx-lm`:
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
python -m mlx_lm.generate \
|
| 63 |
+
--model /path/to/downloaded/snapshot/mlx-4bit \
|
| 64 |
+
--prompt "Reply with a short explanation of what this model is." \
|
| 65 |
+
--max-tokens 256
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
## Local compatibility note
|
| 69 |
+
|
| 70 |
+
The source config uses `model_type: qwen3_5_moe_text`. At conversion time,
|
| 71 |
+
`mlx-lm 0.31.3` did not include a native loader for that exact model type, so
|
| 72 |
+
the conversion used a local compatibility shim mapping the model to the
|
| 73 |
+
existing Qwen3-Next style MLX implementation and adapting the published weight
|
| 74 |
+
names.
|
| 75 |
+
|
| 76 |
+
Consumers may need an `mlx-lm` build that supports `qwen3_5_moe_text`, or an
|
| 77 |
+
equivalent local compatibility shim, until upstream support is available.
|
| 78 |
+
|
| 79 |
+
## Provenance and attribution
|
| 80 |
+
|
| 81 |
+
- Source model: [`kai-os/Grug-35B-A3B`](https://huggingface.co/kai-os/Grug-35B-A3B)
|
| 82 |
+
- Relationship: MLX quantized derivatives of the source model
|
| 83 |
+
- Source revision used locally: `f6349f9c7beba10ad44ce0210b0a0f6fba414a05`
|
| 84 |
+
- Conversion tool: `mlx-lm 0.31.3`
|
| 85 |
+
- Quantization mode: affine, group size 64
|
| 86 |
+
|
| 87 |
+
Please refer to the source model card for upstream training details, intended
|
| 88 |
+
use, limitations, acknowledgements, and license context.
|
| 89 |
+
|
| 90 |
+
## Limitations
|
| 91 |
+
|
| 92 |
+
Quantization can change output quality, numerical behavior, and edge-case
|
| 93 |
+
performance. These files are intended for local MLX inference on Apple Silicon.
|
| 94 |
+
Use the source model repo for the original Transformers/safetensors weights.
|