Skip to main content
Articles

Run your first model with NeuroBrix

· NeuroBrix

NeuroBrix runs language, speech, image and video models from one engine and one container format (.nbx). You do not install a stack per model: you import a container and run it. This tutorial takes you from nothing to three models in a few minutes. We ran every command below, exactly as written, on CPUs with no GPU at all (a 4-core machine, and a larger one for the language model); on a GPU or a Mac it is the same commands, only faster.

1. Install

pip install "neurobrix[pytorch]"

That is the install for a CPU, or for any machine where you want the PyTorch engine. On a GPU under Linux or Windows, plain pip install neurobrix is enough: the Triton engine runs on nbxtensor, our own tensor library, with no PyTorch at all. On a Mac, add python -m nbxtensor install-metal to run on its GPU.

2. Make it listen

Download a 16-second recording from 1969 (public domain, NASA) and give it to a speech-to-text model:

curl -L -o small_step.mp3 https://huggingface.co/spaces/Neurobrix/made-with-neurobrix/resolve/main/media/small_step.mp3
neurobrix import openai/whisper-large-v3-turbo --accept-license
neurobrix run --model openai/whisper-large-v3-turbo --audio small_step.mp3

import downloads the container once (1.5 GB) and shows the model's licence; run reads everything it needs from the container: the graph, the weights, the tokenizer. It prints back what it heard: That's one small step for man, one giant leap for mankind. Word for word, in 13.5 s on our 4-core CPU. Your own recordings work the same way.

3. Sharpen an image

neurobrix import xinntao/Real-ESRGAN-RealESRGAN_x4plus --accept-license
neurobrix run --model xinntao/Real-ESRGAN-RealESRGAN_x4plus --input-image photo.png --output photo_x4.png

Our 400×224 picture came back at 1600×896, four times sharper, in 16.5 s on the same CPU. A print shop, a photo archive, a product catalogue: an upscaler is often the one AI function a business really needs, and it runs on the machine it already has.

4. Ask a language model

For this step, use a machine with 8 GB of RAM or more.

neurobrix import TinyLlama/TinyLlama-1.1B-Chat-v1.0 --accept-license
neurobrix run --model TinyLlama/TinyLlama-1.1B-Chat-v1.0 --prompt "Write a Python function that reverses a string."

It answers with a reverse_string function: a docstring, return string[::-1], and an example that prints olleh.

5. See what you have

neurobrix list

After steps 2 and 3, ours showed:

MODEL                                  FAMILY    SIZE    LICENSE       STORE
xinntao/Real-ESRGAN-RealESRGAN_x4plus  upscaler  68 MB   bsd-3-clause  .nbx
openai/whisper-large-v3-turbo          stt       1.5 GB  mit           .nbx

Where to go next

  • 49 models are ready on the hub and on Hugging Face: image generation with Flex, video with CogVideoX and Wan, code with Qwen3-Coder, vision-language with GLM-4.1V. Each one runs with the same import and run.
  • See and hear these outputs, with their commands, in Made with NeuroBrix.
  • If NeuroBrix ran a model for you, a star on GitHub helps the next developer find it.