Instructions to use Hygaard/Sage-S2.1-Flash-oQ3e-mtp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Hygaard/Sage-S2.1-Flash-oQ3e-mtp with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("Hygaard/Sage-S2.1-Flash-oQ3e-mtp") config = load_config("Hygaard/Sage-S2.1-Flash-oQ3e-mtp") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use Hygaard/Sage-S2.1-Flash-oQ3e-mtp with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Hygaard/Sage-S2.1-Flash-oQ3e-mtp"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Hygaard/Sage-S2.1-Flash-oQ3e-mtp" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use Hygaard/Sage-S2.1-Flash-oQ3e-mtp with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Hygaard/Sage-S2.1-Flash-oQ3e-mtp"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Hygaard/Sage-S2.1-Flash-oQ3e-mtp
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Hygaard/Sage-S2.1-Flash-oQ3e-mtp with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Hygaard/Sage-S2.1-Flash-oQ3e-mtp"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Hygaard/Sage-S2.1-Flash-oQ3e-mtp" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Sage-S2.1-Flash-oQ3e-mtp
oQ3e mixed-precision MLX conversion of Sage S2.1 Flash for Apple Silicon.
Effective weight storage: 3.69 BPW ยท 148.35 GB ยท group size 64.
Sage S2.1 Flash is a scientific multimodal and agentic model from Shanghai Artificial Intelligence Laboratory / InternLM, built on the GLM-5.3-Flash architecture. This conversion retains the full expert set, vision encoder, multi-token-prediction head and original tokenizer, processor and chat template. No additional training, abliteration or expert pruning was applied.
Conversion
- Source: creator BF16/FP32 checkpoint,
internlm/Sage-S2.1-Flash@76f4513db7464485605a002a06a6190de0460574. - Format: MLX safetensors; oQ3e mixed precision, affine packing, group size 64.
- Tooling: oMLX
0.8.0rc1native oQe streaming converter. - Calibration: 128 samples, 512 tokens each, using the bundled code/multilingual corpus; collected independently for this quant.
- Weights: 29 root shards, 148.35 GB / 138.16 GiB, including text, vision and MTP. Runtime and KV cache need additional memory.
Conversion details are in CONVERSION.json.
Mixed precision
3.69 effective bits per weight (BPW), including affine scales/biases, unquantized tensors and safetensors headers.
| Component | Weight precision | Original parameters | Stored GB |
|---|---|---|---|
| Routed MoE experts | 3-bit / 4-bit | 311,653,564,416 | 137.254404 |
| Attention projections | 8-bit | 6,088,556,544 | 6.469091 |
| Shared experts | 8-bit | 1,082,130,432 | 1.149764 |
| Dense MLP projections | 8-bit | 452,984,832 | 0.481296 |
| Token embeddings | 8-bit | 634,388,480 | 0.674038 |
| Output head | 8-bit | 634,388,480 | 0.674038 |
| Vision encoder | BF16 | 563,627,008 | 1.127254 |
| Linear-attention convolutions | BF16 | 3,342,336 | 0.006685 |
| Indexer pooling/compression | 8-bit / BF16 | 89,662,464 | 0.101173 |
| Text/MTP normalization | BF16 | 422,144 | 0.000844 |
| MTP fusion projection | BF16 | 33,554,432 | 0.067109 |
| MoE routers/correction biases | FP32 | 50,737,248 | 0.202949 |
| Hyperconnections | FP32 | 35,391,870 | 0.141567 |
| Recurrent decay controls | FP32 | 280,704 | 0.001123 |
| Safetensors headers | โ | โ | 0.000402 |
| Total | 3.69 effective BPW | 321,323,031,390 | 148.351738 |
Stored GB uses decimal units. Component totals include MTP and exclude the separate scientific projectors. The nine original scientific projectors add 0.168 GB and remain in FP32.
Per-block precision map
| Block | Routed expert matrices | Other quantized matrices | Unquantized tensors | Stored GB |
|---|---|---|---|---|
| Text 0 | โ (dense MLP) | 8-bit | BF16 / FP32 | 0.310052 |
| Text 1 | โ (dense MLP) | 8-bit | BF16 / FP32 | 0.310052 |
| Text 2 | โ (dense MLP) | 8-bit | BF16 / FP32 | 0.310052 |
| Text 3 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 4 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 5 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 6 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 7 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 8 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 9 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 10 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 11 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 12 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 13 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 14 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 15 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 16 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 17 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 18 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 19 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 20 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 21 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 22 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 23 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 24 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 25 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 26 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 27 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 28 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 29 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 30 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 31 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 32 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 33 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 34 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 35 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 36 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 37 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 38 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 39 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 40 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 41 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 42 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| Text 43 | 3-bit | 8-bit | BF16 / FP32 | 3.338730 |
| Text 44 | 3-bit | 8-bit | BF16 / FP32 | 3.351972 |
| MTP 0 | 4-bit | 8-bit | BF16 / FP32 | 4.308687 |
Complete per-module/tensor precision data (CSV) and exact accounting (JSON) are included.
Running
Use oMLX 0.8.0rc1 for text, images, tool calling and native MTP decoding. Keep the included Sage tokenizer, processor and chat template together.
Scientific inputs require the matching SciPerception encoders and integration in addition to the included projector files.
Other precision variants
- Sage S2.1 Flash oQ5e: 5.61 effective BPW, 225.36 GB.
- Sage S2.1 Flash oQ4e: 4.64 effective BPW, 186.40 GB.
Each variant is converted directly from the same pinned creator BF16/FP32 checkpoint, not requantized from another variant.
Credits and license
Model: Shanghai Artificial Intelligence Laboratory / InternLM. GLM architecture: Z.ai. Conversion tooling: oMLX / oQe. Community conversion: Hygaard.
Licensed under MIT. See NOTICE for attribution and modification notes.
- Downloads last month
- 67
3-bit
Model tree for Hygaard/Sage-S2.1-Flash-oQ3e-mtp
Base model
internlm/Sage-S2.1-Flash