Toggle light / dark theme

Get the latest international news and world events from around the world.

Log in for authorized contributors

6 Finetuning for Classification

V/ Sebastian Raschka.

For weekend reading:

Chapter 6 (Finetuning LLMs for Classification) of Build an LLM from Scratch book is now finally available on the Manning website:


  • Introducing different LLM finetuning approaches
  • Preparing a dataset for text classification
  • Modifying a pretrained LLM for finetuning
  • Finetuning an LLM to identify spam messages
  • Evaluating the accuracy of a finetuned LLM classifier
  • Using a finetuned LLM to classify new data

In previous chapters, we coded the LLM architecture, pretrained it, and learned how to import pretrained weights from an external source, such as OpenAI, into our model. In this chapter, we are reaping the fruits of our labor by finetuning the LLM on a specific target task, such as classifying text, as illustrated in figure 6.1. The concrete example we will examine is classifying text messages as spam or not spam.

New AI tech predicts cardiac events due to coronary inflammation

“The ORFAN study is an expanding global registry which will include long-term clinical and outcome data for 250,000 patients from around the world, and we are very pleased to publish these initial results,” said Keith Channon, MD, Professor of Cardiovascular Medicine at University of Oxford, Caristo Chief Medical Officer, and co-author of The Lancet publication.

“Coronary inflammation is a crucial piece of the puzzle in predicting heart attack risk. We are excited to discover that CaRi-Heart results performed exceptionally well in predicting patient cardiac events. This tool is well positioned to help clinicians identify high-risk patients with seemingly ‘normal’ CCTA scans.”

Ron Blankstein, MD, Professor of Medicine and Radiology at Harvard Medical School, Director of Cardiac Computed Tomography at Brigham and Women’s Hospital, and co-author of the publication, applauded The Lancet for publishing results from one of the largest studies in the field of CCTA.

Precision’s Brain Chip Sets Record with 4,096 Electrodes on Brain, Better Than Neuralink?

In this new standard set by Precision Neuroscience, the rising brain chip industry is seeing significant growth, especially with Neuralink, also known for its first successful implant in the past.

Precision’s Brain Chip Sets Record With 4.096 Electrodes on Brain

Precision Neuroscience shared its latest milestone on its brain-computer interface (BCI), which it recently placed on a human brain in collaboration with the Mount Sinai Health System, successfully placing 4,096 electrodes on cerebral matter.

NASA’s ChatGPT-like AI will let spaceships talk to astronauts

NASA is developing a ChatGPT-style interface for future spacecraft, giving astronauts the ability to talk to the systems using natural language — and have the systems talk right back.

Space talk: In June 2018, a massive dust storm on Mars engulfed NASA’s Opportunity rover, cutting off communication with Earth. Eight months later, NASA announced an end to the rover’s 15-year Mars mission.

“The last message [NASA] received was basically, ‘My battery is low and it’s getting dark,’” tweeted science reporter Jacob Margolis after talking to NASA about the rover.