Instructions to use itslenoid/llama3.2-3b-ninjutsu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use itslenoid/llama3.2-3b-ninjutsu 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("itslenoid/llama3.2-3b-ninjutsu") 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 itslenoid/llama3.2-3b-ninjutsu with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "itslenoid/llama3.2-3b-ninjutsu" --prompt "Once upon a time"
- Atomic Chat
π₯· LoRA Adapter (MLX) β Llama 3.2 3B Instruct (Ninjutsu Coaching)
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:
- "Break down a 15-minute deliberate practice session for developing hip drive in rotational strikes."
- "I keep losing balance during rapid direction changes on uneven ground. Diagnose my mechanical error."
- "Design a 3-stage progressive overload constraint drill for handling high-pressure sparring."
- "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.
- Source Material: ninjainbrazil.com/book
- Live Interactive Demo: Hugging Face Space
- Training Engine: project-kingmaker/llm-goalie
- Standalone Fused Model: itslenoid/llama3.2-3b-ninjutsu-fused
- PyTorch PEFT Weights: itslenoid/llama3.2-3b-ninjutsu-peft
π License
This adapter inherits the Meta Llama 3.2 Community License from the base model.
Quantized
Model tree for itslenoid/llama3.2-3b-ninjutsu
Base model
meta-llama/Llama-3.2-3B-Instruct