Skip to content

Commit 086037b

Browse files
authored
Add overview for LLM inference deployment methods
Added an overview of deploying and running Large Language Models on the NYU Torch/Greene cluster, including methods for basic inference and high-performance serving.
1 parent 2b5abc7 commit 086037b

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,23 @@
1+
# Overview
2+
This directory provides two primary pathways for deploying and running Large Language Models (LLMs) on the NYU Torch/Greene cluster: Hugging Face Transformers (for research/experimentation) and vLLM (for high-performance serving).
13

4+
## 1. Basic Inference (Hugging Face)
5+
This method is ideal for feature extraction, embeddings, or small-scale batch processing. It relies on a persistent Singularity environment using an .ext3 overlay.
6+
7+
**Workflow:**
8+
Environment: Launch an Apptainer container with a read/write overlay.
9+
Persistence: Install Conda/Miniforge and libraries directly into /ext3.
10+
Execution: Use AutoModel to load weights and perform a forward pass.
11+
Key File: huggingface.py
12+
Ideal for: Extracting last_hidden_state (embeddings) or sentiment classification.
13+
14+
## 2. High-Performance Serving (vLLM)
15+
vLLM is the recommended tool for production-level throughput and low-latency inference. It utilizes PagedAttention to manage memory efficiently.
16+
17+
**Why vLLM?**
18+
Speed: higher throughput than standard backends on Torch.
19+
Compatibility: Drop-in replacement for OpenAI API.
20+
21+
**Deployment Options:**
22+
Online: Use vllm serve to start an HTTP server accessible via curl or OpenAI clients.
23+
Offline: Use the LLM class within Python for processing large datasets without a server.

0 commit comments

Comments
 (0)