Articles for tag pytorch
-
Would Fine-Tuning Have Beaten Jev?The third post in my series on describing a classifier with Jev versus training one. This time I fine-tuned BERT on the same Jigsaw toxicity comments. With enough labels it ranks toxic comments better than Jev and the cloud-embedding models, but it needs about 500 labels to pass Jev, a GPU to train, and it misses almost every comment on the two rarest labels.
-
The Bouncer's Dilemma: Jev, k-NN, and MLP for Comment ModerationIn my last post, I skipped training a spam classifier and used Jev instead. Here, I compare Jev with a neural network and k-NN built from thousands of labeled comments in the Jigsaw toxicity dataset: how accurate each one is, how many labels they need, and what they cost to run.
-
From PyTorch to Browser: a full client-side solution with ONNX and Transformers.jsBuild a full client-side toxicity detection solution using Transformers.js, ONNX Runtime, and the `all-MiniLM-L6-v2` model. Train a custom model on the Kaggle Toxic Comment Classification Challenge dataset, convert it to ONNX, and run it in the browser for fast, private text analysis. Get 98% accuracy with this approach, see the code, and try the live demo.
-
From PyTorch to Browser: Creating a Web-Friendly AI ModelLearn how to build and deploy a custom sentiment analysis model for the web using PyTorch and Google's LiteRT! This guide walks you through the process of creating a model from scratch, training it on a YouTube comments dataset, converting it to a browser-friendly format, and running it in the browser with TensorFlow Lite and the Google Gen AI JavaScript library. Perfect for web developers looking to leverage custom AI models.