How to use from the
Use from the
MLX library
# 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("MLXBits/sulphur-prompt-enhancer-uncensored-mlx-q4")
config = load_config("MLXBits/sulphur-prompt-enhancer-uncensored-mlx-q4")

# 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)

This model is an MLX conversion quantized to q4 for the prompt enhancer included with Sulphur-2-base. It's tested in LM Studio, and roughly 3x-4x the tokenization rate vs. running the original GGUF model on Apple M-series Macs.

To use, download the files and place them in your LM Studio models directory using the "owner/model" path structure other models use, or just use LM Studio to download directly.

Or use HF Hub and just symlink it

hf download MLXBits/sulphur-prompt-enhancer-uncensored-mlx-q4
mkdir -p $HOME/.lmstudio/models/sulphur/prompt-enhancer-uncensored-mlx-q4
ln -s $HOME/.cache/huggingface/hub/models--MLXBits--sulphur-prompt-enhancer-uncensored-mlx-q4/snapshots/<snapshot hash> $HOME/.lmstudio/models/sulphur/prompt-enhancer-uncensored-mlx-q4
Downloads last month
238
Safetensors
Model size
2B params
Tensor type
BF16
·
U32
·
F32
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for MLXBits/sulphur-prompt-enhancer-uncensored-mlx-q4

Quantized
(15)
this model

Collection including MLXBits/sulphur-prompt-enhancer-uncensored-mlx-q4