You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
2
+
This directory provides two primary pathways for deploying and running Large Language Models (LLMs) on the NYU Torch cluster: Hugging Face Transformers (for research/experimentation) and vLLM (for high-performance serving).
3
3
4
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.
5
+
This method is ideal for feature extraction, embeddings, or small-scale batch processing. Persistence is achieved by setting up the environment within an `ext3` overlay that can be mounted to an Apptainer container.
6
6
7
7
**Workflow:**
8
8
Environment: Launch an Apptainer container with a read/write overlay.
9
-
Persistence: Install Conda/Miniforge and libraries directly into `/ext3`.
9
+
Persistence: Install `conda` and libraries directly into `/ext3`.
10
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.
11
+
Key File: `huggingface.py`
12
+
Ideal for: Extracting `last_hidden_state` (embeddings) or sentiment classification.
13
13
14
14
## 2. High-Performance Serving (vLLM)
15
15
vLLM is the recommended tool for production-level throughput and low-latency inference. It utilizes `PagedAttention` to manage memory efficiently. Please find our guide on [deploying LLMs with vLLM on Torch here](./03_vLLM.md).
@@ -19,5 +19,5 @@ Speed: higher throughput than standard backends on Torch.
19
19
Compatibility: Drop-in replacement for OpenAI API.
20
20
21
21
**Deployment Options:**
22
-
Online: Use vllm serve to start an HTTP server accessible via curl or OpenAI clients.
22
+
Online: Use `vllm serve` to start an HTTP server accessible via curl or OpenAI clients.
23
23
Offline: Use the LLM class within Python for processing large datasets without a server.
0 commit comments