SambaFlow learning map

Welcome! This doc page is a learning map for users new to SambaNova. It helps you see the big picture and find the information you need quickly. Here’s an overview:

SambaFlow in the software stack

Tutorials: GitHub and doc

Many of us learn best by doing. This set of tutorials includes sample code on GitHub and code discussion in this doc set.

  • Find tutorial code and a README with instructions in our sambanova/tutorials External link public GitHub repo.

  • For each tutorial, explore the code discussion in this doc set, which has a special focus on how code for running on RDU is different from code in other environments.

  • The learning map above points to some additional materials — for example, even if you’re trying out the simplest model, you most likely want to go to the API Reference External link.

The tutorials in this doc set use different code than tutorials included in /opt/sambaflow/apps. Tutorial examples have been updated and streamlined.
Table 1. Tutorial code, README, and code discussion
Tutorial Description Code and README Code discussion

Hello SambaFlow (logreg)

Learn how to compile and and run training. The tutorial code downloads the dataset.

hello_world on Github External link

Examine logreg model code

Intermediate (lenet)

Step through a complete machine learning workflow. Includes data preparation, compile and training run, and running inference.

lenet on Github External link

Examine LeNet model code

Conversion 101

Understand model conversion by looking at a simple CNN model. Includes two solutions: One uses an integrated loss function, another uses an external loss function.

Basics in Convert a simple model to SambaFlow

Model functions and changes Model with an external loss function

Transformers on RDU

Use a pretrained Hugging Face GPT-2 model on RDU. The tutorial discusses data preparation, compile and training run, and running inference. The code is in two separate files discusses how inference runs differ from training runs.

Generative NLP on Github External link

Code elements of the training program
Code elements of the inference program


Many of us learn best by understanding the big picture first — having a look at a map before exploring unknown territory. The doc set includes several pages that help you get oriented (or dig deep after initial exploration with the code).


All developers have to rely on reference documentation to get their job done. For SambaFlow, we include the following:

Data preparation, SambaNova Runtime, and SambaTune

The following resources in this doc set or elsewhere might help you learn more:

  • Data preparation scripts. We have a public GitHub repository External link with two scripts for pretraining data creation, and

  • SambaNova Runtime documentation. Information on logs, fault management, and other lower-level procedures.

  • SambaTune documentation. SambaNova tool for performance optimization (advanced).