sambanova / tutorials

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SambaNova tutorials

This repository contains SambaNova tutorials that help you to learn more about the SambaNova platform. Each tutorial includes instructions for preparing the dataset, the code to run the model, and pointers to code discussions in our public documentation.

Start with the "Hello, World" tutorial, which uses a very simple model and the MNIST dataset. You follow some basic steps to run this ML models on the SambaNova platform.

Use the LeNet tutorial to experience a full ML workflow:

  1. Compile the model for SambaNova processors (RDU)

  2. Train the model using a publicly available dataset

  3. Save intermediate checkpoints and continue training from a checkpoint

  4. Run inference using one of the checkpoints and generate a predictions file

  5. Visualize predictions using Jupyter

Go through the generative_nlp tutorial to work with a Hugging Face model in the SambaNova environment.

  1. Download a GPT-2 model (we’ve chosen a simple model to speed up compilation and fine tuning).

  2. Download and prepare a dataset.

  3. Compile the model.

  4. Fine tune the compiled model using the labeled dataset.

  5. Perform inference with the unlabeled dataset to verify that training worked.

How to use SambaNova tutorials

  1. Clone this repository

    $ git clone https://github.com/sambanova/tutorials.git
  2. Enter one of the directories, e.g. hello_world:

    $ cd tutorials
    # Start with the 'Hello world'
    $ cd hello_world
    # Or choose the intermediate tutorial that uses LeNet
    $ cd lenet
  3. Follow the instructions in the README file.

Feedback

Please provide your feedback at docs@sambanova.ai.

About

License:Apache License 2.0


Languages

Language:Jupyter Notebook 86.3%Language:Python 13.7%