Instructions to use npc-worldwide/enpisi-coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use npc-worldwide/enpisi-coder with PEFT:
Task type is invalid.
- MLX
How to use npc-worldwide/enpisi-coder with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download npc-worldwide/enpisi-coder --local-dir enpisi-coder
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
enpisi-coder
LoRA adapters for npcsh agentic command execution β tool calling, shell command generation, and file-operation reasoning.
Trained on judge-rated npcsh benchmark traces
(npc-worldwide/npcsh-traces,
npc-worldwide/enpisi-coder-data).
Layout
Weights are grouped by target format first, then base model, then run. Format is in
every path on purpose: the MLX adapters are Apple-Silicon-only and cannot be loaded by
transformers/peft, and GGUF is not a training format in either case.
mlx/ # Apple Silicon (MLX). Requires macOS/arm64 + mlx_lm.
qwen3.5-0.8b/
sft-recent/ # best-scoring MLX adapter
smoke/
legacy-unnamed/
qwen3.5-2b/
v1/
v2/
hf/ # PyTorch / transformers + peft (CUDA or CPU). Cross-platform.
qwen3.5-0.8b/
qwen3.5-2b/
gguf/ # llama.cpp. Inference only, quantized.
qwen3.5-0.8b/
qwen3.5-2b/
Format support matrix
| Format | Status | Consumed by | Notes |
|---|---|---|---|
mlx/* |
Available (3 runs) | mlx_lm on macOS/arm64 |
QLoRA onto a 4-bit base. Not loadable on Linux/CUDA. |
hf/* |
Ready to train | transformers + peft |
No weights yet. train_hf_lora.py is in place; needs a CUDA GPU. |
gguf/* |
Blocked | llama.cpp |
Requires a trained hf/ adapter first. |
| GGUF (full model) | Available upstream | llama.cpp |
Use unsloth/Qwen3.5-0.8B-GGUF until our own conversion lands. |
Why hf/ is empty
The existing adapters were trained with MLX on a 4-bit quantized base
(mlx-community/Qwen3.5-0.8B-4bit). That blocks a straightforward port:
- The 0.8B SFT checkpoint contains 133 non-LoRA tensors alongside its 248 LoRA tensors.
Those extra tensors are
linear_attnconv1d.weight,A_log,dt_biasandnorm.weight-- the gated-DeltaNet recurrent state, stored dequantized by MLX. They are a quantization artifact, not trained weights. - There are no
lora_b-only / merged weight equivalents usable bypeftwithout the exact 4-bit base restored. mlx_lm.fuse-- the normal MLX to HF path -- requires macOS on Apple Silicon.
So hf/ is a retrain in PyTorch, not a conversion.
Training hf/
hf/qwen3.5-0.8b/train_hf_lora.py performs the retrain. It reuses npcpy.ft.run_sft,
which has both MLX and PyTorch backends, so it is the same pipeline that produced the
existing adapters.
The data is already prepared: npc-worldwide/enpisi-coder-data/sft.csv is 282 rows of
(prompt, response) -- the same high-composite traces (judge composite >= 0.7) used for
mlx/qwen3.5-0.8b/sft-recent, so the two runs are directly comparable.
pip install -U "transformers>=5.0" peft accelerate trl datasets
python hf/qwen3.5-0.8b/train_hf_lora.py --device cuda
transformers >= 5 is required -- 4.x cannot parse model_type: qwen3_5 at all.
A CUDA GPU is required for a practical run. The script defaults to 846 steps
(282 examples x 3 epochs at batch size 1); a CPU-only run of that is measured in days.
To verify plumbing without training, use --device cpu --max-steps 2.
Base Qwen/Qwen3.5-0.8B is multimodal (Qwen3_5ForConditionalGeneration); for text-only
training, load the text class (Qwen3_5ForCausalLM) so vision weights are not pulled into
memory.
Why gguf/ is blocked
Two independent gaps, both real:
- No
hf/adapter to convert.llama.cppshipsconvert_lora_to_gguf.py, which consumes apeft-format LoRA directory. We do not have one yet. - The converter requires a base-model GGUF. It needs the architecture metadata to map
tensor names β it does not read an HF
config.jsonalone. That base GGUF exists upstream (unsloth/Qwen3.5-0.8B-GGUF), so this gap is solvable.
Once hf/ exists, the pipeline is:
python convert_lora_to_gguf.py <hf-adapter-dir> \
--base <path-or-repo>/Qwen3.5-0.8B-Q8_0.gguf \
--outfile enpisi-coder-0.8b-lora.gguf --outtype f16
llama.cpp must be recent enough to include LLM_ARCH_QWEN35 support (qwen35 /
qwen35moe in src/llama-arch.cpp, Qwen3_5ForConditionalGeneration in
conversion/qwen.py). Older revisions cannot handle Qwen3.5 at all, so pull before
converting.
Available MLX adapters
| Path | Base | LoRA | Tensors | Notes |
|---|---|---|---|---|
mlx/qwen3.5-0.8b/sft-recent |
mlx-community/Qwen3.5-0.8B-4bit |
r8 / alpha16, 16 layers, dropout .15 | 381 (248 LoRA + 133 state) | Best result. Stopped at end of epoch 2. |
mlx/qwen3.5-0.8b/smoke |
mlx-community/Qwen3.5-0.8B-4bit |
r16 / alpha16, 24 layers, dropout .10 | 505 | 60-iteration smoke run. |
mlx/qwen3.5-2b/v1 |
mlx-community/Qwen3.5-2B-4bit |
r8 / alpha16, 16 layers | 248 | Weights only, no card. |
mlx/qwen3.5-2b/v2 |
mlx-community/Qwen3.5-2B-4bit |
r8 / alpha16, 16 layers | 248 | Weights only, no card. |
mlx/qwen3.5-0.8b/legacy-unnamed |
mlx-community/Qwen3.5-0.8B-4bit |
r8 / alpha16, 16 layers | 248 | Bare mlx/adapters.safetensors from the original upload. Unnamed run; kept for provenance. |
sft-recent numbers
- Data: 282 traces with
composite >= 0.7from a 5-judge ensemble. - Training: 3 epochs planned, batch 1, max length 256, lr 2e-5, via
npcpy.ft.run_sft. - Stopped early: Metal OOM at the start of epoch 3; shipped weights are the end-of-epoch-2 checkpoint (iteration 282).
- Eval (single-turn, n=30): base 0.123 β adapter 0.309 composite (+0.186; 28 up / 1 down / 1 tie).
- Eval (agent-loop, n=10): base 4/10 pass β adapter 5/10 pass, fewer turns on shell / system / git / text tasks.
Caveats carried over from the original card: every task id was seen in training (no held-out split for the single-turn eval), and the agent-loop eval is n=10.
Usage
MLX (macOS / Apple Silicon)
from npcpy.llm_funcs import get_llm_response
r = get_llm_response(
"Use list_files to list /tmp.",
model="/path/to/enpisi-coder/mlx/qwen3.5-0.8b/sft-recent", # local path
provider="mlx",
tools=tools, tool_map=tool_map,
auto_process_tool_calls=True,
)
Pass a local path, not the Hub repo id.
npcpy.ft.sft.load_sft_modelresolves an HF repo id by requiring anadapters/<name>/prefix and raisesNo adapters/ subfolder foundotherwise. Neither this repo's layout nor the original pre-restructure one satisfies that. A local path skips the prefix logic. Seehf/qwen3.5-0.8b/README.mdfor the full explanation.
The subdirectory must point at a specific run β the repo root holds several adapters and is not itself loadable.
HF / peft (once hf/ is populated)
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "Qwen/Qwen3.5-0.8B"
tok = AutoTokenizer.from_pretrained(base)
model = PeftModel.from_pretrained(
AutoModelForCausalLM.from_pretrained(base),
"npc-worldwide/enpisi-coder",
subfolder="hf/qwen3.5-0.8b",
)
Requires transformers >= 5 β version 4.54.1 cannot parse model_type: qwen3_5.
Corrected from the previous card
- License: previously
apache-2.0at the root butmitin the adapter subfolder. Base models are Apache-2.0, so this repo is Apache-2.0 throughout. Themitline was wrong. - Usage snippet: the old root card showed
load_sft_model("npc-worldwide/enpisi-coder")pointing at the repo root, which is not a loadable adapter. Corrected to require a format+run subfolder. - Structure diagram: the old one described
adapters/qwen3.5/{mlx,hf,gguf}with everything marked "Planned", but weights actually sat in flat top-level dirs with no format marker. Restructured as above. - Base-model metadata: the old root card declared no
base_model, so the Hub could not link the adapter toQwen/Qwen3.5-0.8B.
Ecosystem
- Downloads last month
- -
Quantized