Category Archives: Transformers

Attention Regression Parameterized by Embedding Dim and Weights Dim

The goal of a machine learning regression problem is to predict a single numeric value. Classical ML regression techniques include linear regression, kernel ridge regression, gradient boosting regression, and others. I’ve been experimenting with a new algorithm for machine learning … Continue reading

Posted in PyTorch, Transformers | Leave a comment

Adding a Transformer Module to a PyTorch Regression Network – Linear Layer Pseudo-Embedding and NLP Style Positional Encoding

I’ve been looking at adding a Transformer module to a PyTorch regression network. Because the key functionality of a Transformer is the attention mechanism, I’ve also been looking at adding a custom Attention module instead of a Transformer. There are … Continue reading

Posted in PyTorch, Transformers | Leave a comment

How Large Language Model Attention is Related to Embedding and Positional Encoding

The key component of a large language model such as GPT-x, is a software module called a Transformer. The key component of a Transformer is called an Attention module. I was giving a talk about the large language model (LLM) … Continue reading

Posted in Machine Learning, Transformers | Leave a comment

Adding a Transformer Module to a PyTorch Regression Network – Linear Layer Pseudo-Embedding

I’ve been looking at adding a Transformer module to a PyTorch regression network. Because the key functionality of a Transformer is the attention mechanism, I’ve also been looking at adding a custom Attention module instead of a Transformer. There are … Continue reading

Posted in PyTorch, Transformers | Leave a comment

Adding a Transformer Module to a PyTorch Regression Network – No Numeric Pseudo-Embedding

I’ve been looking at adding a Transformer module to a PyTorch regression network. Because the key functionality of a Transformer is the attention mechanism, I’ve also been looking at adding a custom Attention module instead of a Transformer. There are … Continue reading

Posted in PyTorch, Transformers | Leave a comment

Adding a Transformer Module to a PyTorch Regression Network – Classic NLP Positional Encoding

I’ve been looking at adding a Transformer module to a PyTorch regression network. Because the key functionality of a Transformer is the attention mechanism, I’ve also been looking at adding a custom Attention module instead of a Transformer. There are … Continue reading

Posted in PyTorch, Transformers | 1 Comment

Adding a Transformer Module to a PyTorch Regression Network

I’ve been looking at adding a Transformer module to a PyTorch regression network. Because the key functionality of a Transformer is the attention mechanism, I’ve also been looking at adding a custom Attention module instead of a Transformer. For both … Continue reading

Posted in PyTorch, Transformers | Leave a comment

PyTorch Anomaly Detection for Sequential Data Using an Autoencoder with a Transformer Module and Numeric Pseudo-Embedding

Whew! This may be one of the worst blog titles I’ve ever written, but it was the best I could do. Let me try to explain. The idea starts with the data. Most ordinary data is not sequential. For example, … Continue reading

Posted in PyTorch, Transformers | Leave a comment

Creating Some Semi-Realistic Synthetic Medical Data

The goal of one of my ongoing projects is to find anomalies in medical data, where the data is ordered in some way. I imagine each line of data represents a hospital patient, and each value on a line is … Continue reading

Posted in PyTorch, Transformers | Leave a comment

An Experiment with Applying Attention to a PyTorch Regression Model on a Synthetic Dataset

The goal of a machine learning regression problem is to predict a single numeric value. Classical ML regression techniques include linear regression, Gaussian process regression, gradient boosting regression, and others. I’ve been experimenting with a new algorithm for machine learning … Continue reading

Posted in PyTorch, Transformers | Leave a comment