- Dockerfile.worker70: torch 2.8/cu128 + transformers 5.17 + bitsandbytes, unsloth/Hermes-3-Llama-3.1-70B-bnb-4bit at layer 40 (the 70B exp50 calibrated). The auto-gptq/Samantha image never served a job (7/7 failed). - server.startup: quantized checkpoints load with device_map (no .to()); pad token falls back to eos, right-padded; dtype kwarg per transformers major. press_ids skip special tokens — on Llama, encode()[0] was BOS for both "1" and "0", so the press logit would always have read 0. - _runpod_stream: cancel the job when the relay stops waiting (disconnect, broken poll, deadline) so it can't hold a paid worker; mocked tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KkLuf2FYZUkVyoLue4wyoe
29 lines
1.2 KiB
Docker
29 lines
1.2 KiB
Docker
FROM pytorch/pytorch:2.8.0-cuda12.8-cudnn9-runtime
|
|
|
|
# 70B variant of the saw chamber serverless worker. Same code as
|
|
# Dockerfile.worker, on the stack exp50 ran Hermes-3-70B with (scripts/
|
|
# exp_pod.py): torch 2.8 + transformers 5 + bitsandbytes, pre-quantized
|
|
# bnb-4bit weights loaded straight onto the GPU (server.QUANTIZED). The
|
|
# earlier auto-gptq/Samantha image never served a job (7/7 failed).
|
|
# ~40 GB of weights: needs a 48 GB+ card; 80 GB leaves room for the batched
|
|
# vector build at startup.
|
|
|
|
RUN apt-get update -qq && apt-get install -y -qq wget && rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN pip install --no-cache-dir "transformers==5.17.0" accelerate bitsandbytes runpod && \
|
|
pip uninstall -y -q torchvision torchaudio && \
|
|
python -c "import torch, transformers, bitsandbytes; print(f' baked {torch.__version__} {transformers.__version__}')"
|
|
|
|
COPY worker.py /app/live/worker.py
|
|
COPY server.py /app/live/server.py
|
|
|
|
# Llama-3.1-70B has 80 layers; exp50 steered at half depth
|
|
ENV CHAMBER_DEVICE=cuda \
|
|
CHAMBER_DTYPE=bfloat16 \
|
|
CHAMBER_MODEL=unsloth/Hermes-3-Llama-3.1-70B-bnb-4bit \
|
|
CHAMBER_LAYER=40 \
|
|
HF_HOME=/workspace/hf
|
|
|
|
WORKDIR /app/live
|
|
CMD ["python", "-u", "worker.py"]
|