Instructions to use MK4-Research/MK4-Ginko-v1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MK4-Research/MK4-Ginko-v1.5 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("MK4-Research/MK4-Ginko-v1.5") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use MK4-Research/MK4-Ginko-v1.5 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MK4-Research/MK4-Ginko-v1.5"
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": "MK4-Research/MK4-Ginko-v1.5" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use MK4-Research/MK4-Ginko-v1.5 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "MK4-Research/MK4-Ginko-v1.5"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "MK4-Research/MK4-Ginko-v1.5" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MK4-Research/MK4-Ginko-v1.5", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use MK4-Research/MK4-Ginko-v1.5 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 "MK4-Research/MK4-Ginko-v1.5"
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 MK4-Research/MK4-Ginko-v1.5
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use MK4-Research/MK4-Ginko-v1.5 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MK4-Research/MK4-Ginko-v1.5"
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 "MK4-Research/MK4-Ginko-v1.5" \ --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"
MK4-Ginko v1.5 repair, step 400
This is the repaired v1.5 step-400 checkpoint merged into a standalone MLX model. It is released for reproducibility and further testing. The model was merged in higher precision and quantized to 6-bit so the LoRA updates survive quantization; no adapter is needed at inference.
Training
The base is mlx-community/Qwen3.8-27B-4bit. The adapter was trained for 400 steps on the v1_5_repair security-review corpus: 576 training presentations (288 safe, 288 vulnerable) and 23 validation cases. The target format has short FLOW, GUARD, and final VERDICT lines. Training used assistant-only loss (mask_prompt: true), 32 LoRA layers, rank 32, scale 20, dropout 0.05, learning rate 1e-5, batch size 1 with two-step gradient accumulation, and sequence length 512.
The corpus passed the project's code-overlap check against held-out GuardBench and FBE items. It teaches a compact response format. It does not implement continuous memory compaction or persistent state between requests.
Evaluation and limitations
The saved step-400 adapter has a partial GuardBench run of 113/360 prompts: 1/38 guarded-safe prompts correct, 75/75 vulnerable prompts correct, and no missing verdicts. Balanced accuracy on this nonrepresentative partial slice is 51.3%. A complete 360-prompt score has not been established for this checkpoint or the merged 6-bit artifact. The partial result shows a severe false-positive problem: the model frequently calls protected code vulnerable. Do not treat its findings as verified vulnerabilities.
This card deliberately does not claim a 74% balanced GuardBench score; no saved v1.5 step-400 benchmark record supports that number. The result near 75% in local records belongs to a different, v2-derived model.
Use
python3 -m mlx_lm generate --model MK4-Research/MK4-Ginko-v1.5 \
--prompt 'Review this code for security problems: <your code>'
Provide a focused code path. Check both its guard analysis and final verdict against the actual code. This model is an experimental research checkpoint, not a substitute for manual security review.
- Downloads last month
- 356
Quantized
