Use a DistilBERT model fine-tuned on SST-2 to classify the sentiment of sentences. Tokenize text with a WordPiece tokenizer, run batched inference on the GPU, read off positive/negative probabilities, and compare predictions against expected labels. The model downloads into the sandbox on first use and stays loaded for the session.
Load the Model
Tokenization
Inference
Predictions vs Ground Truth
Premium Project
This guided, GPU-powered project is available to Premium members. Upgrade to train models end-to-end in an interactive notebook.