Skip to content

Welcome to the "Text Generation with PyTorch" repository! This repository is dedicated to showcasing various techniques and examples of text generation using PyTorch.

Notifications You must be signed in to change notification settings

faezeh-gholamrezaie/Text-Generation-with-PyTorch-Techniques-and-Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Text-Generation-with-PyTorch-Techniques-and-Examples

Welcome to the "Text Generation with PyTorch" repository! This repository is dedicated to showcasing various techniques and examples of text generation using PyTorch.

Bigram Language Model

bigram img

The bigram model is used to generate characters. We train the model using a notebook written by a wizard as the dataset, which consists of 81 unique characters. Each character is represented as a (1 * 1) vector. Since there are 81 characters and each batch has 4 blocks, with each block containing 8 characters, the input dimension for the model is (4 * 8 * 81) after applying the nn.Embedding. After reshaping the tensor, the dimension becomes (32 * 81). In other words, the reshaped vector represents 32 characters, and we use it to predict the next most probable character.

About

Welcome to the "Text Generation with PyTorch" repository! This repository is dedicated to showcasing various techniques and examples of text generation using PyTorch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published