Image-Text-to-Text
MLX
Safetensors
gemma4
lemma
8bit
apple-silicon
multimodal
on-device
conversational
Instructions to use lthn/lemrd-mlx-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use lthn/lemrd-mlx-8bit 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("lthn/lemrd-mlx-8bit") config = load_config("lthn/lemrd-mlx-8bit") # 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 lthn/lemrd-mlx-8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "lthn/lemrd-mlx-8bit"
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": "lthn/lemrd-mlx-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use lthn/lemrd-mlx-8bit 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 "lthn/lemrd-mlx-8bit"
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 lthn/lemrd-mlx-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use lthn/lemrd-mlx-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "lthn/lemrd-mlx-8bit"
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 "lthn/lemrd-mlx-8bit" \ --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"
Commit History
-
fix(config): sync with upstream Google Gemma 4 day-1 fixes (b446025, b4a6011)
Verified signature- Restore vision_config block; clean eos_token_id to [1, 106] - Align generation_config.json transformers_version field Preserves local tokenizer_config.json (model_specific_special_tokens embedded into model during LEK training).88b4e90
-
docs: correct base_model lineage for HF model tree
Snider +1: VirgilHF uses base_model + base_model_relation frontmatter to rank models in search results and render the model tree widget. The Lemma family's true lineage is: google/gemma-4-*-it └── LetheanNetwork/<m> (finetune — our namespace fork) └── lthn/<m> (finetune — LEK merged into weights) └── lthn/<m>-mlx (quantized — mlx 4/8bit/bf16) Previously this repo had base_model_relation set to quantized, which was wrong — LEK merging is a finetune, not a quant. Fixing so the model tree widget ranks the family correctly. Co-Authored-By: Virgil <virgil@lethean.io>d31df73
-
feat: merge LEK into lemrd weights
Snider +1: VirgilLEK-2 LoRA merged into Gemma 4 31B Dense attention projections. Converged at loss 0.0002 in 278 steps via patience-stop (best at 248). Gradient checkpointing enabled. KV-shared layers restored from base. Co-Authored-By: Virgil <virgil@lethean.io>826e60a -
fix: pull Google's chat_template.jinja fix (26B/31B variant)
Snider +1: Cladius MaximusCo-Authored-By: Cladius Maximus <cladius@lethean.io>4407e16 -
fix: replace LICENSE symlink with real EUPL-1.2 file
Snider +1: Cladius MaximusCo-Authored-By: Cladius Maximus <cladius@lethean.io>7f0ef4d
-
fix: exact configs from unsloth 31b-8bit reference
Snider +1: Cladius MaximusCo-Authored-By: Cladius Maximus <cladius@lethean.io>d51392e -
Upload config.json with huggingface_hub
Verified signature4af73c7 -
Upload tokenizer_config.json with huggingface_hub
Verified signaturee539a3a -
Upload config.json with huggingface_hub
Verified signature7b26f19 -
Upload processor_config.json with huggingface_hub
Verified signature0e8f8a8 -
Upload config.json with huggingface_hub
Verified signaturea4314e3 -
Upload folder using huggingface_hub
Verified signature54958a0 -
initial commit
Verified signature80f7dd9