Skip to content

Optimizing Few-Shot Learning in Pruned Large Language Models with Task-Specific Prompts

Sep 2026 · Arrow - TU Dublin (Technological University Dublin)
Domain Adaptation and Few-Shot Learning

Abstract

Few-shot learning enables large language models to efficiently perform tasks given only a limited number of labeled examples. However, training these models entirely from scratch requires substantial computational resources, making it challenging for many organizations to fully leverage their potential. This thesis explores how structured pruning, task-specific prompting, and parameter-efficient fine-tuning can be combined to preserve few-shot learning capabilities in compressed LLMs, while also extending their utility to real-world recommendation systems. In this research, we propose the Tailored LLM framework, which first reduces model size through structured pruning and then enhances few-shot learning performance using carefully designed prompts. We experiment with pruned variants derived from two original LLaMA models of 7B and 13B parameters. Specifically, from the 7B parameter model, we obtain pruned variants with 5B, 4B, and 2B parameters, and from the 13B parameter model, variants of 11B, 9B and 7B parameters. Fine-tuning is conducted on task-specific datasets with a small subset of weights modified using the Low-Rank Adaptation (LoRA) method. One of the important contributions of our work is the careful crafting of prompts tailored explicitly for each few-shot learning task, significantly improving task accuracy after pruning. Experimental results demonstrate the effectiveness of our method. Fine-tuning a 7B LLaMA model pruned by 50% for less than one hour achieves a classification accuracy of 95.68% at a 20% compression ratio, and 86.54% at a 50% compression ratio, utilizing only 50 training examples. Further evaluation reveals that, even after aggressive pruning, the models retain more than 65% of the baseline accuracy across the classification tasks. Additionally, we demonstrate the effectiveness of LLM-derived embeddings in a CTR prediction pipeline. By combining contextual embeddings from a fine-tuned LLaMA model with collaborative signals from a separately trained Deep Interest Network (DIN) model, we achieve strong performance across multiple recommendation datasets. This hybrid setup highlights the versatility of compressed LLMs in both language understanding and real-world ranking tasks. This thesis confirms that optimized task-specific prompting, combined with structured pruning and targeted fine-tuning, considerably improves few-shot learning performance. This approach provides an efficient pathway for adapting large language models to specific tasks, particularly valuable in scenarios where computational resources are limited.

Read PDF

Similar papers

#small language model Dataset Open access Oct 2026

Socratic guiding questions in synthetic arithmetic data: matched LoRA runs (revision v2)

Supporting data, adapters, predictions and code for the article *Low-Cost LoRA Fine-Tuning of Small Language Models for Multi-Step Arithmetic Reasoning* by Jake O'Grady, Asena Isik Gürhan, Chee Fong Ting and Effirul Ramlan (University of Galway). We generated 20,000 GSM8K-derived arithmetic problems with step-by-step s...

O'Grady, Jake, Gürhan, Asena Isik, Chee, Fong Ting et al. · 465 citations
#computer vision Open access Jun 2016

Software Development in Startup Companies: The Greenfield Startup Model

The results are packaged in the Greenfield Startup Model (GSM), which explains the priority of startups to release the product as quickly as possible, and the need to shorten time-to-market, by speeding up the development through low-precision engineering activities.

Carmine Giardino, Nicolò Paternoster, M. Unterkalmsteiner et al. · 178 citations · ⚡14
#computer vision Open access Oct 2016

Software Startups - A Research Agenda

Software startup companies develop innovative, software-intensive products within limited timeframes and with few resources, searching for sustainable and scalable business models.

M. Unterkalmsteiner, P. Abrahamsson, Xiaofeng Wang et al. · 157 citations · ⚡17
#machine learning Review Open access Oct 2016

“Failures” to be celebrated: an analysis of major pivots of software startups

This study conducts a case survey study based on the secondary data of the major pivots happened in 49 software startups, and demonstrates that customer need pivot is the most common among all pivot types.

Sohaib Shahid Bajwa, Xiaofeng Wang, Anh Nguyen-Duc et al. · 127 citations · ⚡15
#computer vision Review Open access May 2015

A survey study on major technical barriers affecting the decision to adopt cloud services

The comparison of adopter and non-adopter sample reveals three potential adoption inhibitor, security, data privacy, and portability, which underlines the importance of the technical and security perspectives for research investigating the adoption of technology.

Nattakarn Phaphoom, Xiaofeng Wang, S. Samuel et al. · 111 citations · ⚡8
#computer vision Conference Open access Dec 2013

Affordable and Energy-Efficient Cloud Computing Clusters: The Bolzano Raspberry Pi Cloud Cluster Experiment

The ongoing work building a Raspberry Pi cluster consisting of 300 nodes is presented, with potential use cases being an inexpensive and green test bed for cloud computing research and a robust and mobile data center for operating in adverse environments.

P. Abrahamsson, S. Helmer, Nattakarn Phaphoom et al. · 110 citations · ⚡7

Related blog posts

Microsoft Research Blog Oct 12, 2026

Simulating student learning for better AI tutoring

StudentSim is a research system for evaluating and improving AI tutoring tools before they are tested with learners. It models how individuals may engage with tutors, giving feedback to improve tutor performance across subjects like chess, writing, and mathematics. The post Simulating student learning for better AI tutoring appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.