Skip to content
nijaruPublic

About

Experimental Rust model inference engine with CUDA and Metal execution.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Ribn

Ribn is an early Rust inference engine for serving models across hardware. The experimental text paths below cover Qwen3.8 GGUF on CUDA and Gemma 4 SafeTensors on Metal or CUDA. They are not general-purpose format loaders. Qwen4-35B-A3B is the next integration workload and is not yet supported.

Try it

Use the Rust toolchain pinned in rust-toolchain.toml. Ribn takes a local model path: inspect MODEL examines it, run MODEL streams one reply, and serve MODEL starts a loopback HTTP server. Add --help to any command for its options.

If you already have a GGUF file, inspect its metadata without a GPU. This does not check whether Ribn can run the model.

cargo run --locked -p ribn-cli -- inspect /path/model.gguf

Qwen3.8 on NVIDIA CUDA

Use Qwen3.8-27B-UD-Q4_K_M.gguf from unsloth/Qwen3.8-27B-GGUF (16.46 GB). The device qualification records the artifact hash and tested RTX 4090 setup. You need a CUDA-capable NVIDIA GPU with enough memory for the model and request state.

cargo run --locked --release -p ribn-cli --features cuda -- \
  run /path/Qwen3.8-27B-UD-Q4_K_M.gguf --prompt 'Explain a mutex.' --max-tokens 128

Gemma 4 on Apple silicon or NVIDIA CUDA

Use the google/gemma-4-E4B-it BF16 SafeTensors snapshot specified in the artifact manifest. Pass the local snapshot directory, not the individual weights file. The BF16 weights file alone is about 16 GB; allow additional memory for execution. On macOS, use inspect /path/to/package with --features metal to calculate the requested resident layout without loading weights or initializing Metal.

cargo run --locked --release -p ribn-cli --features metal -- \
  run /path/to/gemma-4-E4B-it --prompt 'Explain a mutex.' --max-tokens 128

Use --features cuda instead of --features metal on NVIDIA. --raw selects plain completion instead of chat; --file and piped stdin also work. Input over the 256 KiB envelope (including the role in chat mode) is rejected, not truncated.

See serving for the loopback HTTP quickstart and supported completion/chat subset. Sampling support depends on the executor. The server is not for public exposure.

Maintainer guide · Apache-2.0

About

Experimental Rust model inference engine with CUDA and Metal execution.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages