{"slug":"fine-tuned-model-to-gguf","question":"How do I package a LoRA fine-tune for local serving?","answer":"Merge the LoRA adapter into its base model, then quantize the merged model to GGUF. With the base already pulled, a2a.computer plans the merge→quantize path over governed capabilities.","source":"lora_adapter","target":"gguf","available":["hf_dir"],"family":"Model embodiment","methodology":"The planner requires the base model (hf_dir) to be available and routes lora_adapter → merged model → GGUF. Each hop is a governed CHP capability; the merge step is huggingface.merge_adapter (merge_and_unload).","limitations":["Requires the base model on hand — without it the planner returns NO_VALID_PATH, which is itself a demand signal.","Merging then quantizing compounds a small loss; the planner sums the per-edge loss estimates."],"related":["huggingface-model-to-gguf"],"updated":"2026-08-12","paths":{"source":"lora_adapter","target":"gguf","paths":[{"rank":1,"score":0.735,"total_loss":0.12,"total_cost_s":90,"hops":1,"max_risk":"high","steps":[{"capability_id":"chp.adapters.mlx.fuse","consumes":"hf_dir","produces":"gguf","loss":0.12,"cost_s":90,"risk":"high","note":"Fuse + export GGUF directly (mlx.fuse export_gguf=True; Llama/Mistral bases)."}]},{"rank":2,"score":0.66,"total_loss":0.15,"total_cost_s":180,"hops":1,"max_risk":"high","steps":[{"capability_id":"chp.adapters.huggingface.quantize_to_gguf","consumes":"hf_dir","produces":"gguf","loss":0.15,"cost_s":180,"risk":"high","note":"Convert + quantize an HF model to GGUF (llama.cpp; Q4_K_M/Q8_0/...)."}]},{"rank":3,"score":0.5874,"total_loss":0.1376,"total_cost_s":150,"hops":2,"max_risk":"high","steps":[{"capability_id":"chp.adapters.mlx.fuse","consumes":"hf_dir","produces":"safetensors","loss":0.02,"cost_s":60,"risk":"high","note":"Fuse an MLX LoRA into its base -> standalone weights (safetensors)."},{"capability_id":"chp.adapters.mlx.fuse","consumes":"hf_dir","produces":"gguf","loss":0.12,"cost_s":90,"risk":"high","note":"Fuse + export GGUF directly (mlx.fuse export_gguf=True; Llama/Mistral bases)."}]},{"rank":4,"score":0.5724,"total_loss":0.1376,"total_cost_s":180,"hops":2,"max_risk":"high","steps":[{"capability_id":"chp.adapters.huggingface.merge_adapter","consumes":"lora_adapter","produces":"hf_dir","loss":0.02,"cost_s":90,"risk":"high","note":"Merge a LoRA adapter into its base HF model (merge_and_unload) -> standalone HF dir."},{"capability_id":"chp.adapters.mlx.fuse","consumes":"hf_dir","produces":"gguf","loss":0.12,"cost_s":90,"risk":"high","note":"Fuse + export GGUF directly (mlx.fuse export_gguf=True; Llama/Mistral bases)."}]},{"rank":5,"score":0.513,"total_loss":0.167,"total_cost_s":240,"hops":2,"max_risk":"high","steps":[{"capability_id":"chp.adapters.mlx.fuse","consumes":"hf_dir","produces":"safetensors","loss":0.02,"cost_s":60,"risk":"high","note":"Fuse an MLX LoRA into its base -> standalone weights (safetensors)."},{"capability_id":"chp.adapters.huggingface.quantize_to_gguf","consumes":"hf_dir","produces":"gguf","loss":0.15,"cost_s":180,"risk":"high","note":"Convert + quantize an HF model to GGUF (llama.cpp; Q4_K_M/Q8_0/...)."}]}],"eliminated":[],"diagnostic":null},"path_error":null,"capability_ids":["chp.adapters.mlx.fuse","chp.adapters.huggingface.quantize_to_gguf","chp.adapters.huggingface.merge_adapter"],"mcp_tools":["find_transmutation_paths","estimate_transmutation","realize_state","retrieve_evidence"]}