Architecture Forward Forward - kennetholsenatm-gif/q_mini_wasm_v2 GitHub Wiki
Each layer learns independently using local goodness metrics. No gradient chain required.
Tropical inner product: goodness = max(x_i × w_i)
| Sample Type | Goal |
|---|---|
| Positive | Maximize goodness |
| Negative | Minimize goodness |
Hebbian rule (gradient-free):
w_new = w_old + lr × (goodness_pos - goodness_neg) × input
Layers train independently — fully parallelizable across SYCL work groups.
- No vanishing gradients
- Local learning (no global coordination)
- Hardware-friendly (integer operations)
- Natural fit for ternary state space
- C++17 compiler (GCC 7+, Clang 5+, MSVC 2017+)
- CMake 3.14+
- Git
git clone https://github.com/kennetholsenatm-gif/q_mini_wasm_v2.git
cd q_mini_wasm_v2/q_mini_wasm_v2
mkdir build && cd build
cmake ..
cmake --build .| Flag | Default | Description |
|---|---|---|
BUILD_TESTS |
ON |
Build test executables |
USE_SYCL |
OFF |
Enable SYCL acceleration |
BUILD_WASM |
OFF |
Build WebAssembly target |
BUILD_SHARED_LIBS |
OFF |
Build shared library |
cd build
ctest --output-on-failurecmake -G "Visual Studio 17 2022" ..
cmake --build . --config Releasecmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j$(nproc)cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j$(sysctl -n hw.ncpu)- Download Intel oneAPI Base Toolkit from intel.com
- Install with default options
- Source the environment:
source /opt/intel/oneapi/setvars.shcmake -DUSE_SYCL=ON -DCMAKE_CXX_COMPILER=icpx ..
cmake --build . -j$(nproc)./q_mini_wasm_v2_tests --gtest_filter="*sycl*"| Issue | Solution |
|---|---|
IntelSYCL not found |
Source setvars.sh first |
| GPU not detected | Check sycl-ls output |
| Link errors | Ensure DPC++ runtime installed |
- Fork the repository
- Create a feature branch:
git checkout -b feature/name - Make changes
- Ensure CI passes
- Submit a pull request
- C++17 standard
- Headers use
#pragma once - Namespace:
q_mini_wasm_v2:: - All public APIs must have doc comments
Follow Cognitive Ergonomics principles:
- Line length ≤ 75 characters
- Paragraphs ≤ 4 lines
- Headers every ±200 words
- Code blocks ≤ 15 lines
- Navigation depth ≤ 3 levels
type: short description
Longer explanation if needed.
Types: feat, fix, docs, refactor, test, chore
All changes must pass: