Downloads · 30 days
749
41% of all-time downloads
Blankyy/needle-mlx
needle-mlx is a machine learning model from Blankyy. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as mit.
MLX port of Cactus-Compute/needle, a 26M-parameter encoder-decoder tool-calling model.
Downloads · 30 days
749
41% of all-time downloads
All-time downloads
1.8K
Public
Parameters
26.2M
52.6 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors52.5 MB · 100%
From the Hugging Face model README
MLX port of Cactus-Compute/needle, a 26M-parameter encoder-decoder tool-calling model.
uv run python - <<'PY'
import mlx.core as mx
from model import SimpleAttentionNetwork
from tokenizer import NeedleTokenizer, build_encoder_input
path = "mlx-model" # or a downloaded Hugging Face snapshot
model = SimpleAttentionNetwork.from_pretrained(path)
tokenizer = NeedleTokenizer.from_pretrained(path)
tools = '[{"name":"get_weather","parameters":{"location":"string"}}]'
src = mx.array([build_encoder_input(tokenizer, "Weather in Delhi?", tools)])
print(tokenizer.decode(model.generate(src, max_new_tokens=128)).removeprefix("<tool_call>"))
PY
Create the upload directory from the original checkpoint:
uv run convert.py weights mlx-model
uvx --from huggingface_hub hf upload mlx-community/needle-mlx mlx-model .
This repository uses a custom Needle architecture. It runs through the included
MLX implementation; it is not currently supported by mlx-lm, Ollama,
llama.cpp, or LM Studio. GGUF or an Ollama Modelfile alone cannot add the
missing architecture implementation.
MIT. Original model and weights: Cactus Compute.