NumKong
NumKong is a high-performance SIMD-accelerated math library supporting 16+ numeric types (from 6-bit floats to 64-bit complex numbers) across multiple CPU architectures and platforms. It provides bindings for C, C++, Python, Rust, JavaScript, Swift, and Go, with a footprint of ~5 MB and reported performance gains over NumPy, PyTorch, and JAX in specific workloads.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | ashvardanian/NumKong |
| Owner | ashvardanian |
| Primary language | C |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.8k |
| Forks | 124 |
| Open issues | 31 |
| Latest release | v7.7.0 (2026-05-23) |
| Last updated | 2026-07-08 |
| Source | https://github.com/ashvardanian/NumKong |
What NumKong is
A portable mixed-precision BLAS-like library with 2,000+ SIMD kernels covering vector operations (dot products, distances, similarities), matrix operations, and geospatial transforms. It uses accumulator promotion to prevent overflow (e.g., Int8→Int32, Float16→Float32) and includes validation against 118-bit extended-precision baselines across multiple ISA variants (x86, Arm NEON, RISC-V, LoongArch, Power, WASM).
Get the NumKong source
Clone the repository and explore it locally.
git clone https://github.com/ashvardanian/NumKong.gitcd NumKong# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Accumulator promotion is automatic; verify that promoted precision meets your numerical stability requirements (e.g., Float16 dot products promote to Float32).
- Binary is small (~5 MB), but multi-language bindings require linking appropriate language runtimes; C/C++ integration is likely lowest-friction.
- SIMD ISA selection is hardware-aware but not user-tunable from high-level API; if non-default ISA choice is needed, verify documentation or file issue.
- Validation is claimed against 118-bit references, but reproducibility of those baselines and audit trail are not clearly documented; consider independent validation for safety-critical use.
- Open issues (31 at time of data) and active maintenance suggest ongoing development; check issue queue for blockers in your target platforms (e.g., WASM, LoongArch).
When to avoid it — and what to weigh
- Need production-grade cuBLAS or TPU acceleration — NumKong targets CPU SIMD (x86, Arm, RISC-V, etc.). No GPU or tensor accelerator support documented. If your workload requires CUDA, ROCm, or TPU, this is not a fit.
- Require mature ecosystem compatibility — While bindings exist, ecosystem maturity is unproven. PyTorch, TensorFlow, and JAX have years of production use, vendor optimization, and large user bases. NumKong is younger (created 2023) and adoption is limited.
- Throughput benchmarks are your primary metric — README shows latency (single-call) performance gains but mixed results on matrix-mult throughput vs. PyTorch+MKL and NumPy+OpenBLAS. If maximizing sustained throughput is critical, established libraries may be safer.
- Deep integration with NumPy/SciPy ecosystem expected — NumKong is not a NumPy drop-in replacement. Switching incurs API changes and potential revalidation of numerical results. Existing codebases relying on np.dot, scipy.spatial, etc. require porting.
License & commercial use
Apache License 2.0 (Apache-2.0). A permissive OSI-approved license allowing commercial use, modification, and distribution with attribution and indemnification clauses. No copyleft restrictions.
Apache-2.0 is a permissive license compatible with commercial use. No evidence of proprietary restrictions, dual licensing, or undisclosed commercial terms. However, verify compliance with your own indemnification and attribution policies. As with any open-source dependency, ensure you can sustain maintenance or have a support plan if upstream development slows.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | Medium |
No published security policy or known CVEs documented in provided data. Library handles numeric data without inherent buffer-overflow or injection risk typical of C SIMD code, but assembly-heavy implementation (2000+ kernels) increases surface area for edge-case bugs. Input validation (e.g., vector bounds, NaN/Inf handling) appears to be validated but specifics not public. For production use, review source code or request a security audit, especially if processing untrusted numeric input. No mention of fuzzing, ASAN, or formal verification.
Alternatives to consider
NumPy + OpenBLAS / Intel MKL
Mature, widely adopted, extensive ecosystem (SciPy, Pandas, etc.). Larger footprint (~30 MB NumPy alone). Throughput on f32/f64 competitive or better. Lower risk for production systems; trade-off is binary size and less control over numeric precision.
PyTorch / JAX
Framework-level abstractions, GPU support, XLA compilation. Much larger (300–700 MB). Higher throughput on large batches and accelerators. Better for ML pipelines; not suitable if you need minimal footprint or CPU-only numeric kernels.
Eigen (C++)
Header-only, highly optimized for dense linear algebra. Mature, widely used in robotics and game engines. Limited to C++; no Python bindings. Mixed-precision support is less comprehensive than NumKong.
Build on NumKong with DEV.co software developers
If you're building resource-constrained vector search, quantized ML inference, or cross-language numeric pipelines, NumKong merits a proof-of-concept. Start with the Python API, benchmark against your baseline (NumPy/PyTorch), and validate error bounds for your precision model. Contact us if you need help integrating or evaluating SIMD-accelerated alternatives.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
NumKong FAQ
Does NumKong support GPU/CUDA acceleration?
Can I use NumKong as a drop-in replacement for NumPy?
What numeric types are supported?
Is there professional support or SLA?
Custom software development services
From first prototype to production, DEV.co delivers software development services around tools like NumKong. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across vector databases and beyond.
Evaluate NumKong for Your Numeric Workload
If you're building resource-constrained vector search, quantized ML inference, or cross-language numeric pipelines, NumKong merits a proof-of-concept. Start with the Python API, benchmark against your baseline (NumPy/PyTorch), and validate error bounds for your precision model. Contact us if you need help integrating or evaluating SIMD-accelerated alternatives.