Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 568 Bytes

File metadata and controls

20 lines (11 loc) · 568 Bytes

Tutorial for Marxist Language Models

This tutorial expands Nelimarkka's (2026) work on finetuning language models to make social science perspectives more prominent.

Before class

Install packages

pip install transformers[torch] datasets torch ipywidgets pandas

After that in the project folder

hf download openai-community/gpt2

Inference

Notebook shows how to load a foundation model using the transformers framework.

Finetune

Notebook to finetune a model to be used yourself.