Package for Inferencing AI at DSC
Project description
AIDSC: Lightweight Classroom Inference Client
aidsc is a Python client designed for students and researchers to perform LLM inference on classroom clusters. It acts as a gateway to the Zeus control plane, allowing you to run models on high-performance classroom hardware from your local machine.
🚀 Key Features
- Classroom-Ready: Built specifically for inferencing classroom machines running LLMs.
- Seamless Remote Access: Works via SSH tunneling to bridge the gap between your local environment and the school's internal network.
- Port Mapping: Automatically maps the remote Zeus port
32553to yourlocalhost:32553. - Lightweight & Typed: A small but powerful client with Pydantic-validated payloads for reliable integration.
🌐 Connectivity: Zeus & PAMD
Depending on your network location, there are two ways to connect:
- Direct (Localhost): If you already know what Zeus is and it is reachable on your network (or you are running it locally),
aidscconnects directly tohttp://127.0.0.1:32553. - Remote (PAMD Tunnel): If Zeus is not reachable, you must connect through PAMD.
- The client uses SSH Tunneling to bring the remote inference port to your machine.
- Goal: Bridge
remote:32553→localhost:32553. - Logic: The client will prompt for your PAMD credentials and establish a background tunnel via
ssh -f -N -L.
📦 Installation
From the root of this repository:
uv sync
aidsc is installed as an editable package. You can then import it in your Python scripts:
from aidsc import aidsc, LanguageArgs, LanguageInferenceRequest
🛠️ Setup & Usage
1. Interactive Bootstrap
If you are running this for the first time or need to set up your SSH tunnel, use the interactive setup:
from aidsc import aidsc
client = aidsc()
client.setup_interactive() # Prompts for PAMD username and establishes the tunnel
2. Performing Inference
Once connected, you can send requests to the classroom machines.
from aidsc import aidsc, LanguageArgs, LanguageInferenceRequest
# Initialize client (reads .env automatically)
client = aidsc()
# Define your request
req = LanguageInferenceRequest(
args=LanguageArgs(
model="gpt-oss-20b",
questions=["Explain quantum entanglement in one sentence."],
),
max_new_tokens=256,
)
# Send to a specific classroom machine (e.g., class117)
# Zeus handles the orchestration; you just provide the request.
response = client.infer(req, server=117)
print(response)
⚙️ Environment Variables
The client reads from a .env file (created automatically during setup_interactive()).
| Variable | Default | Purpose |
|---|---|---|
aidsc_ZEUS_LOCAL_URL |
http://127.0.0.1:32553 |
The primary endpoint for inference. |
PAMD_USER |
(Prompted) | Your school SSH username for the PAMD jump host. |
aidsc_ZEUS_REMOTE_URL |
http://144.174.11.196:32553 |
The internal IP of the Zeus host. |
🏗️ Technical Layout
| Component | Responsibility |
|---|---|
src/aidsc/client.py |
Main entry point; handles high-level orchestration and tunneling logic. |
src/aidsc/models.py |
Data schemas for inference requests and responses. |
src/aidsc/connectivity.py |
SSH tunnel verification and health checking. |
src/aidsc/zeus_client.py |
Low-level HTTP communication with the Zeus API. |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aidsc-0.1.3.tar.gz.
File metadata
- Download URL: aidsc-0.1.3.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22","id":"wilma","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca091e630bdcbd78c84df5af958d3e1b5b9b4d628b6f08af6c43a6a0f7746a44
|
|
| MD5 |
9c3b61e7530692970da73498cbbbba07
|
|
| BLAKE2b-256 |
f0b9a2d52ec0449cf2575bd6eb90448aeba29c79b1909ddb13f541b6fe2881af
|
File details
Details for the file aidsc-0.1.3-py3-none-any.whl.
File metadata
- Download URL: aidsc-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22","id":"wilma","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ac4d01232b302968aab362a357eb3b0ea72602f1d1996a103ecab6c926260c5
|
|
| MD5 |
bdc06a6b10c428270244158295cc9a67
|
|
| BLAKE2b-256 |
bd47fb2003fd2f79385c48a430afe440e1f9c2511f2e1d38777389500e4ecf27
|