Text Generation
MLX
apple-silicon
metal-4
m5
Mixture of Experts
nvfp4
mxfp8
speculative-decoding
inkling-2-mini
Instructions to use balllvin/Inkling-2-Mini-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use balllvin/Inkling-2-Mini-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("balllvin/Inkling-2-Mini-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 balllvin/Inkling-2-Mini-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 "balllvin/Inkling-2-Mini-MLX" --prompt "Once upon a time"
- Atomic Chat
Download scripts/setup.sh from balllvin/Inkling-2-Mini-MLX: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/balllvin/Inkling-2-Mini-MLX/resolve/main/scripts/setup.sh
- Command line
-
hf download hf://balllvin/Inkling-2-Mini-MLX/scripts/setup.sh
-
curl -L -o setup.sh https://huggingface.co/balllvin/Inkling-2-Mini-MLX/resolve/main/scripts/setup.sh
1.1 kB
| set -euo pipefail | |
| ROOT="$(cd "$(dirname "$0")/.." && pwd)" | |
| VENV_DIR="${VENV_DIR:-$ROOT/.venv}" | |
| if [ -n "${PYTHON_BIN:-}" ]; then | |
| if [ ! -d "$VENV_DIR" ]; then | |
| "$PYTHON_BIN" -m venv "$VENV_DIR" | |
| fi | |
| "$VENV_DIR/bin/python" -m pip install --upgrade pip | |
| "$VENV_DIR/bin/pip" install -e "$ROOT" | |
| elif command -v uv >/dev/null 2>&1; then | |
| if [ ! -d "$VENV_DIR" ]; then | |
| uv venv --python 3.12 --seed "$VENV_DIR" | |
| fi | |
| uv pip install --python "$VENV_DIR/bin/python" -e "$ROOT" | |
| else | |
| PY_CMD="" | |
| for cand in python3.12 python3.13 python3; do | |
| if command -v "$cand" >/dev/null 2>&1; then | |
| PY_CMD="$cand" | |
| break | |
| fi | |
| done | |
| if [ -z "$PY_CMD" ]; then | |
| echo "Python 3.11+ is required" >&2 | |
| exit 1 | |
| fi | |
| if [ ! -d "$VENV_DIR" ]; then | |
| "$PY_CMD" -m venv "$VENV_DIR" | |
| fi | |
| "$VENV_DIR/bin/python" -m pip install --upgrade pip | |
| "$VENV_DIR/bin/pip" install -e "$ROOT" | |
| fi | |
| bash "$ROOT/scripts/build_native.sh" | |
| if [ "${DOWNLOAD_MODEL:-0}" = "1" ]; then | |
| "$VENV_DIR/bin/inkling-mlx" download --local-dir "${MODEL_DIR:-$HOME/models/Inkling-2-Mini}" | |
| fi | |