feat: ANE 7B–13B Production Roadmap + Starter Code for OpenClaw Swarm#7
Draft
codegen-sh[bot] wants to merge 1 commit intomainfrom
Draft
feat: ANE 7B–13B Production Roadmap + Starter Code for OpenClaw Swarm#7codegen-sh[bot] wants to merge 1 commit intomainfrom
codegen-sh[bot] wants to merge 1 commit intomainfrom
Conversation
Phase 1 (Days 1-3): Stable Multi-Layer Stacking - mil_gen_llama.h: parameterized MIL generator with RoPE, GQA, residual fusion - bridge/ane_model.py: Python ctypes wrapper + CPU reference forward pass - Weight-swap architecture: 11 compiled kernels, all layers share via reload Phase 2 (Days 4-10): Production Op Coverage + Quantization - quant_pack.h: Q4/Q8 packing + NEON-optimized dequant (<1ms/layer) - .anepak format for serialized quantized models - LoRA adapter integration as extra constant blobs in MIL Phase 3 (Days 11-21): Swarm-Ready Production - openclaw_manifest.yaml: skill manifest for Lobster registration - Telemetry, inference server, memory guard, watchdog specs Memory fits: 7B Q4 = 7.0 GB, 13B Q3 = 9.7 GB (20 GB cap on M2 24 GB) Target: 12-18 tok/s decode (7B Q4), 5-9 tok/s (13B Q3) on M2 ANE Co-authored-by: dermitchell1993 <dmitchell1993@aliasvault.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
3-Phase Technical Roadmap: Stories110M → 7B–13B on M2 ANE
Comprehensive roadmap + code-level starter files for evolving ANE from the current working 109M-param baseline to production-grade 7B–13B inference and fine-tuning on a 24 GB M2 MacBook, using only the ANE for compute.
Core Architectural Insight: Weight-Swap Architecture
Instead of compiling one kernel per layer (~96 for a 32-layer 7B model, exceeding the ~119 compile limit), compile 11 parameterized kernel programs (6 forward + 5 backward) and iterate layers by swapping weights via
unload→rewrite→load. This is validated by the existingtest_weight_reload.m— the Day 2 gate test at 7B-layer dimensions is the critical go/no-go.Memory Budget (M2 24 GB)
Performance Targets
Deliverables
roadmap/ROADMAP_7B_ANE.mdroadmap/mil_gen_llama.hLlamaConfigstruct, RoPE fusion, GQA stub, residual+SwiGLU FFNbridge/ane_model.pyANEBridge,ANEModel,ModelConfigpresets, CPU reference forward, llama2c loaderroadmap/quant_pack.h.anepakformat headerbridge/openclaw_manifest.yamlDecision Gates
💻 View my work • 👤 Initiated by @dermitchell1993 • About Codegen
⛔ Remove Codegen from PR • 🚫 Ban action checks