How longhornsilicon/lambda works
Lambda is a monorepo for LonghornSilicon’s LLM decode-attention accelerator. Its documented decode path computes Q·Kᵀ, applies online softmax, then computes P·V; KV compression, token-importance management, and ACU precision selection support that datapath. The tree also contains software reference models and a separate APA precision-policy research project. The graph uses README-documented relationships for the chip-level flow and excerpted source relationships for research code; many RTL, integration, and peripheral implementations were not sampled, so their internal wiring is not inferred.
Main entry points: mate MatE · reference.py Attention Reference · evaluator.py Policy Evaluator · vecu VecU
Components 18
Attention Compute
- MatE
src/blocks/acu/mate - VecU
src/blocks/acu/vecu - Attention Output
- Precision Gate
src/blocks/acu/precision_controller
Decode State
- KV Cache Engine
src/blocks/kve - Token Importance
src/blocks/tiu
Reference Models
- MatE Reference
src/blocks/acu/mate/sw/reference_model/mac_array_ref.cpp - Sparsity Model
src/blocks/acu/mate/sw/reference_model/sparsity_controller_ref.py - Precision Reference
src/blocks/acu/precision_controller/sw/reference_model/precision_controller_ref.py - VecU Softmax Model
src/blocks/acu/vecu/sw/reference_model/vecu_softmax_ref.py - KV Engine Reference
src/blocks/kve/sw/reference_model/kv_cache_engine_ref.py - TIU Reference
src/blocks/tiu/sw/reference_model/tiu_ref.py
Precision Research
- Policy Evaluator
research/apa-precision-policy/phase1_policy/evaluator.py - Attention Reference
research/apa-precision-policy/common/reference.py - Block Statistics
research/apa-precision-policy/common/block_stats.py - Quantization
research/apa-precision-policy/common/quantization.py - Workload Sets
research/apa-precision-policy/common/workloads.py
Other components
- Decode Request
Connections 11
- Decode Request → MatE: initiates decode
README.md - MatE → VecU: scores to softmax
README.md - VecU → MatE: probabilities for PV
README.md - MatE → Attention Output: produces output
README.md - KV Cache Engine → MatE: supplies KV state
README.md - Token Importance → MatE: manages token importance
README.md - Precision Gate → MatE: selects precision
README.md - Policy Evaluator → Attention Reference: evaluates against
research/apa-precision-policy/phase1_policy/evaluator.py - Policy Evaluator → Workload Sets: loads workloads
research/apa-precision-policy/phase1_policy/evaluator.py - Attention Reference → Block Statistics: computes statistics
research/apa-precision-policy/common/reference.py - Attention Reference → Quantization: quantizes blocks
research/apa-precision-policy/common/reference.py