Rbebelm uses runtime backend dispatch so a portable R
package can load a backend that matches the current platform. The R
shared library owns registration and dispatch; model code lives in Rust
backend libraries.
library(Rbebelm)
rbebelm_cpuid_info()
#> <Rbebelm CPU features>
#> x86_64-v3: yes
#> x86_64-v4: no
#> NEON: no
#> ARM dotprod: no
#> wasm simd128: no
rbebelm_backend_info()
#> <Rbebelm backend dispatch>
#> mode: dynamic
#> requested: auto
#> selected: avx2
#> loaded: yes
#> installed: scalar,avx2,avx512
#> supported: scalar,avx2Backend loading happens once per R process. If you want to request a
backend, call rbebelm_set_backend() before the first call
that loads backend symbols.
rbebelm_set_backend("auto")
#> Error in `rbebelm_set_backend()`:
#> ! Rbebelm backend is already initialized; call rbebelm_set_backend() before loading a model or querying backend features
rbebelm_backend_features()
#> <Rbebelm backend features>
#> backend: avx2
#> target: x86_64-linux
#> Rust crate: rbebelm_backend 0.1.0
#> native SIMD feature: yes
#> compiled features:
#> AVX2: yes
#> AVX-512F: no
#> NEON: no
#> ARM dotprod: no
#> wasm simd128: no
rbebelm_backend_info()
#> <Rbebelm backend dispatch>
#> mode: dynamic
#> requested: auto
#> selected: avx2
#> loaded: yes
#> installed: scalar,avx2,avx512
#> supported: scalar,avx2Supported backend names depend on the platform. Typical native builds include:
scalaravx2 and avx512 on x86_64 when builtneon on arm64 when builtIf the requested backend is not installed or not supported by the current CPU, the dispatcher reports an error before model code is loaded.
The webR build links a static wasm_simd128 Rust backend.
It uses a patched local copy of upstream BebeLM for Emscripten:
mmap.bebel_model_load() attempts to load a GGUF path from
the webR virtual filesystem.Very large GGUF files can exhaust browser or webR memory. Use smaller models or browser/runtime settings appropriate for the target deployment.
The webR diagnostics report the static backend: