πŸ₯· LoRA Adapter (MLX) β€” Llama 3.2 3B Instruct (Ninjutsu Coaching)

License: Llama 3.2 Framework: MLX Engine: llm-goalie Model Size: 27.8MB Base Model Live Demo

A lightweight low-rank adapter (LoRA) fine-tuned on Llama-3.2-3B-Instruct for Apple Silicon using MLX. Specialized for direct, actionable coaching in skill acquisition, distilled from Modern Applications of Ninjutsu.


πŸ“Œ Model Selection: Which Version Should You Use?

Model Version Repository Format Best For
πŸ“¦ MLX LoRA Adapter (This Repo) itslenoid/llama3.2-3b-ninjutsu MLX (~27.8 MB) Mac (Apple Silicon). Modular adapter weights if you already have mlx-community/Llama-3.2-3B-Instruct-4bit cached.
⚑ Standalone Fused itslenoid/llama3.2-3b-ninjutsu-fused MLX 4-bit (~1.8 GB) Recommended for Mac. Ready-to-run 1-click standalone model without separate base model downloads.
πŸ“¦ PyTorch PEFT Adapter itslenoid/llama3.2-3b-ninjutsu-peft PEFT / PyTorch (~27.8 MB) Standard Hugging Face Transformers & PEFT workflows for Linux / CUDA / Cloud.
πŸš€ Interactive Web Demo itslenoid/llama3.2-3b-ninjutsu-demo Gradio / ZeroGPU Web Browser. Try the model live without local setup.

🎯 What This Model Does

Standard language models often respond to skill and coaching questions with generic advice, disclaimers, and conversational filler. This fine-tune acts as a deliberate practice coach:

  • Direct & Actionable: Tells you what physical or mental adjustments to execute, step-by-step.
  • Progressive Pedagogy: Scaffolds complex movements or skills into digestible sub-skills and constraints.
  • Root-Cause Diagnostics: Identifies mechanical and perceptual errors rather than merely repeating basic form tips.
  • Zero Hedging: Authoritative, concise tone focused on performance feedback and deliberate repetition.

πŸ’‘ Recommended Coaching Prompts

Try prompting the model with concrete training dilemmas or movement questions:

  1. "Break down a 15-minute deliberate practice session for developing hip drive in rotational strikes."
  2. "I keep losing balance during rapid direction changes on uneven ground. Diagnose my mechanical error."
  3. "Design a 3-stage progressive overload constraint drill for handling high-pressure sparring."
  4. "How do I structure skill acquisition for a completely new motor pattern without ingraining bad habits?"

πŸš€ Quick Start (MLX on Apple Silicon)

This adapter runs natively on Apple Silicon using MLX.

1. Install MLX-LM

pip install mlx-lm

2. Run via CLI

Run the base model with the adapter applied directly over the Hub:

python -m mlx_lm.generate \
  --model mlx-community/Llama-3.2-3B-Instruct-4bit \
  --adapter-path itslenoid/llama3.2-3b-ninjutsu \
  --prompt "Break down a 15-minute deliberate practice session for developing hip drive in rotational strikes." \
  --max-tokens 512 \
  --temp 0.7

3. Run in Python

import mlx_lm

# Load base model with LoRA adapter applied
model, tokenizer = mlx_lm.load(
    "mlx-community/Llama-3.2-3B-Instruct-4bit",
    adapter_path="itslenoid/llama3.2-3b-ninjutsu",
    tokenizer_config={"trust_remote_code": True},
)

response = mlx_lm.generate(
    model,
    tokenizer,
    prompt="How do I structure skill acquisition for a new motor pattern without ingraining bad habits?",
    max_tokens=512,
    temp=0.7,
    verbose=True,
)
print(response)

4. (Optional) Fuse Locally

To bake the adapter permanently into the base model weights:

python -m mlx_lm.fuse \
  --model mlx-community/Llama-3.2-3B-Instruct-4bit \
  --adapter-path itslenoid/llama3.2-3b-ninjutsu \
  --save-path ./llama3.2-3b-ninjutsu-fused-local

(Or simply use the pre-fused repository: itslenoid/llama3.2-3b-ninjutsu-fused)


πŸ“Š Training & Technical Details

Fine-tuned on Apple Silicon using MLX LoRA.

Parameter Value
Base Architecture Llama 3.2 3B Instruct
Base Model Weights mlx-community/Llama-3.2-3B-Instruct-4bit
Adapter Type LoRA
LoRA Rank ($r$) 8
LoRA Scale ($\alpha$) 20.0
Tuned Layers 16 / 28
Dropout 0.0
Learning Rate 5e-5 (AdamW)
Max Sequence Length 1024
Training Steps 100 iterations (early stopped at step 75)
Best Validation Loss 2.540 (at step 50)
Perplexity (PPL) 19.05 β†’ 12.68 (~33% relative improvement)

πŸ₯… Defensive Training & Evaluation with llm-goalie

This model was trained, tuned, and evaluated using llm-goalie, an open-source defensive fine-tuning and evaluation engine for Apple Silicon.

llm-goalie ran automated hyperparameter tournament sweeps with active early stopping to prevent overfitting, rigorously triangulating model quality against held-out perplexity (improving from 19.05 β†’ 12.68), catastrophic forgetting benchmarks, and strict rule-based control gates. To reproduce these results or fine-tune your own domain models locally, visit the project-kingmaker/llm-goalie repository.


πŸ“š About the Project & Source Material

This adapter distills pedagogical principles from Modern Applications of Ninjutsu, a treatise on progressive skill acquisition, motor learning, constraint-led training, and martial arts pedagogy.

The training dataset transforms the book's frameworks on deliberate practice, neuromuscular adaptation, and physical discipline into instruction-following weights, producing an assistant capable of diagnosing mechanical breakdowns and prescribing structured drills.


πŸ“„ License

This adapter inherits the Meta Llama 3.2 Community License from the base model.

Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for itslenoid/llama3.2-3b-ninjutsu

Space using itslenoid/llama3.2-3b-ninjutsu 1

Collection including itslenoid/llama3.2-3b-ninjutsu