SambaFlow developer documentation
SambaFlow™ developer documentation includes release notes, quickstart, tutorials, and the Python API reference.
What’s new!
-
Release notes. Learn about new features, deprecated features, and bug fixes.
-
New documentation:
-
Completely revamped SambaFlow tutorials. For each tutorial, we have 1 doc page about running the example, and 1 or more pages with code discussion.
-
New doc about Using sntilestat for performance analysis.
-
Concepts

-
Architecture and workflows. Learn how SambaFlow fits into the SambaNova hardware and software stack, and about the typical compile and run workflow.
-
Compilation overview. Explores the different layers of the compiler stack and explains what happens at each layer.
SambaFlow tutorials
-
SambaFlow learning map. Overview of all tutorials and where to find instructions, tutorial files, and code discussion.
-
Hello SambaFlow! Learn how to compile and run your first model and explore the code discussion to help you create your own models.
-
Intermediate tutorial. Build on Hello SambaFlow! and go through a complete the end-to-end AI workflow in Compilation, training, and inference. The code discussion is in Code elements of the LeNet tutorial.
-
Model conversion. Learn what’s required to run a PyTorch model on RDU from the detailed discussion of code examples in Convert existing models to SambaFlow.
-
Run language example applications. Learn how to run a simple language model that’s included in the SambaFlow installation.
Performance and diagnostics
-
SambaNova messages and logs. Understand which messages to stdout are useful and where different logs are kept.
-
Use sntilestat for performance analysis. Learn how to use the
sntilestat
utility interactively to learn where your model spends time, and how to use the .json and .csv files the tool generates.
Reference
-
SambaNova PyTorch operator support. Reference to supported PyTorch operators. Includes links to the API Reference.
-
Arguments for compile. Reference to commonly used compiler arguments. Includes descriptions and examples.
Tips and tricks
-
Use Python virtual environments. Learn how to use the virtual environments that are included with SambaFlow example applications.
-
Data parallel applications in SambaFlow. Learn about compiling a data parallel model and best practices for data parallel.
-
Use LayerNorm instead of BatchNorm. Learn how to convert a model from BatchNorm to LayerNorm.
-
Control what tokens are back-propagated on during training. Learn how to use token ids to customize which tokens a model learns to generate, and which tokens a model attends to, but does not learn to generate.
-
Best practices for hardware transition. If you’re migrating to SN30 hardware, the best practices help you understand changes to your models you might want to make.
Other materials
-
API Reference
. SambaFlow API reference.
-
Data preparation scripts. We have a public GitHub repository
with two scripts for pretraining data creation,
pipeline.py
anddata_prep.py
. -
SambaNova Runtime documentation. Information on logs, fault management, and other lower-level procedures.