Image-Text-to-Text
MLX
Safetensors
English
qwen3_5
text-generation-inference
apple-silicon
4-bit precision
8-bit precision
mlx-vlm
conversational
Instructions to use prithivMLmods/Zenith-9B-CodeCore-Merge-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use prithivMLmods/Zenith-9B-CodeCore-Merge-MLX 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("prithivMLmods/Zenith-9B-CodeCore-Merge-MLX") config = load_config("prithivMLmods/Zenith-9B-CodeCore-Merge-MLX") # 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 prithivMLmods/Zenith-9B-CodeCore-Merge-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "prithivMLmods/Zenith-9B-CodeCore-Merge-MLX"
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": "prithivMLmods/Zenith-9B-CodeCore-Merge-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use prithivMLmods/Zenith-9B-CodeCore-Merge-MLX 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 "prithivMLmods/Zenith-9B-CodeCore-Merge-MLX"
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 prithivMLmods/Zenith-9B-CodeCore-Merge-MLX
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use prithivMLmods/Zenith-9B-CodeCore-Merge-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "prithivMLmods/Zenith-9B-CodeCore-Merge-MLX"
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 "prithivMLmods/Zenith-9B-CodeCore-Merge-MLX" \ --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"
Update README.md
Browse files
README.md
CHANGED
|
@@ -5,3 +5,138 @@ pipeline_tag: image-text-to-text
|
|
| 5 |
tags:
|
| 6 |
- mlx
|
| 7 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
tags:
|
| 6 |
- mlx
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
## Use with mlx
|
| 12 |
+
|
| 13 |
+
Install the required library:
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
pip install -U mlx-vlm
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
> **Model Note:** `Zenith-9B-CodeCore-Merge` is a 9-billion parameter multimodal coding model designed for code generation, visual debugging, repository reasoning, and architecture diagram analysis. It supports both text and image/screenshot inputs.
|
| 20 |
+
|
| 21 |
+
### BF16 Variant (Base Weights)
|
| 22 |
+
|
| 23 |
+
The full-precision BF16 files reside directly in the root of the repository:
|
| 24 |
+
|
| 25 |
+
#### CLI (Terminal)
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
python -m mlx_vlm generate \
|
| 29 |
+
--model prithivMLmods/Zenith-9B-CodeCore-Merge-MLX \
|
| 30 |
+
--max-tokens 512 \
|
| 31 |
+
--temperature 0.0 \
|
| 32 |
+
--prompt "Analyze this code screenshot, explain what it does, and fix any potential bugs or edge cases." \
|
| 33 |
+
--image <path_to_image>
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
#### Python API
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
from mlx_vlm import load, generate
|
| 40 |
+
from mlx_vlm.prompt_utils import apply_chat_template
|
| 41 |
+
from mlx_vlm.utils import load_config
|
| 42 |
+
|
| 43 |
+
model_path = "prithivMLmods/Zenith-9B-CodeCore-Merge-MLX"
|
| 44 |
+
model, processor = load(model_path)
|
| 45 |
+
config = load_config(model_path)
|
| 46 |
+
|
| 47 |
+
image = ["<path_to_image>"]
|
| 48 |
+
prompt = "Analyze this code screenshot, explain what it does, and fix any potential bugs or edge cases."
|
| 49 |
+
formatted_prompt = apply_chat_template(processor, config, prompt, num_images=len(image))
|
| 50 |
+
|
| 51 |
+
output = generate(
|
| 52 |
+
model,
|
| 53 |
+
processor,
|
| 54 |
+
formatted_prompt,
|
| 55 |
+
image=image,
|
| 56 |
+
max_tokens=512,
|
| 57 |
+
temperature=0.0
|
| 58 |
+
)
|
| 59 |
+
print(output.text)
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
### 8-bit Variant
|
| 63 |
+
|
| 64 |
+
Target the `8bit` subfolder:
|
| 65 |
+
|
| 66 |
+
#### CLI (Terminal)
|
| 67 |
+
|
| 68 |
+
```bash
|
| 69 |
+
python -m mlx_vlm generate \
|
| 70 |
+
--model prithivMLmods/Zenith-9B-CodeCore-Merge-MLX/8bit \
|
| 71 |
+
--max-tokens 512 \
|
| 72 |
+
--temperature 0.0 \
|
| 73 |
+
--prompt "Analyze this code screenshot, explain what it does, and fix any potential bugs or edge cases." \
|
| 74 |
+
--image <path_to_image>
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
#### Python API
|
| 78 |
+
|
| 79 |
+
```python
|
| 80 |
+
from mlx_vlm import load, generate
|
| 81 |
+
from mlx_vlm.prompt_utils import apply_chat_template
|
| 82 |
+
from mlx_vlm.utils import load_config
|
| 83 |
+
|
| 84 |
+
model_path = "prithivMLmods/Zenith-9B-CodeCore-Merge-MLX"
|
| 85 |
+
model, processor = load(model_path, subfolder="8bit")
|
| 86 |
+
config = load_config(model_path, subfolder="8bit")
|
| 87 |
+
|
| 88 |
+
image = ["<path_to_image>"]
|
| 89 |
+
prompt = "Analyze this code screenshot, explain what it does, and fix any potential bugs or edge cases."
|
| 90 |
+
formatted_prompt = apply_chat_template(processor, config, prompt, num_images=len(image))
|
| 91 |
+
|
| 92 |
+
output = generate(
|
| 93 |
+
model,
|
| 94 |
+
processor,
|
| 95 |
+
formatted_prompt,
|
| 96 |
+
image=image,
|
| 97 |
+
max_tokens=512,
|
| 98 |
+
temperature=0.0
|
| 99 |
+
)
|
| 100 |
+
print(output.text)
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
### 4-bit Variant
|
| 104 |
+
|
| 105 |
+
Target the `4bit` subfolder:
|
| 106 |
+
|
| 107 |
+
#### CLI (Terminal)
|
| 108 |
+
|
| 109 |
+
```bash
|
| 110 |
+
python -m mlx_vlm generate \
|
| 111 |
+
--model prithivMLmods/Zenith-9B-CodeCore-Merge-MLX/4bit \
|
| 112 |
+
--max-tokens 512 \
|
| 113 |
+
--temperature 0.0 \
|
| 114 |
+
--prompt "Analyze this code screenshot, explain what it does, and fix any potential bugs or edge cases." \
|
| 115 |
+
--image <path_to_image>
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
#### Python API
|
| 119 |
+
|
| 120 |
+
```python
|
| 121 |
+
from mlx_vlm import load, generate
|
| 122 |
+
from mlx_vlm.prompt_utils import apply_chat_template
|
| 123 |
+
from mlx_vlm.utils import load_config
|
| 124 |
+
|
| 125 |
+
model_path = "prithivMLmods/Zenith-9B-CodeCore-Merge-MLX"
|
| 126 |
+
model, processor = load(model_path, subfolder="4bit")
|
| 127 |
+
config = load_config(model_path, subfolder="4bit")
|
| 128 |
+
|
| 129 |
+
image = ["<path_to_image>"]
|
| 130 |
+
prompt = "Analyze this code screenshot, explain what it does, and fix any potential bugs or edge cases."
|
| 131 |
+
formatted_prompt = apply_chat_template(processor, config, prompt, num_images=len(image))
|
| 132 |
+
|
| 133 |
+
output = generate(
|
| 134 |
+
model,
|
| 135 |
+
processor,
|
| 136 |
+
formatted_prompt,
|
| 137 |
+
image=image,
|
| 138 |
+
max_tokens=512,
|
| 139 |
+
temperature=0.0
|
| 140 |
+
)
|
| 141 |
+
print(output.text)
|
| 142 |
+
```
|