Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
69be05a
Add `examples/gke/deploy-paligemma-2-with-tgi` example (WIP)
alvarobartt Dec 13, 2024
8709ae0
Update `examples/gke/deploy-paligemma-2-with-tgi/README.md`
alvarobartt Dec 13, 2024
3902d13
Update `examples/gke/deploy-paligemma-2-with-tgi/README.md`
alvarobartt Dec 13, 2024
7b89298
Comment manifest separator due to `doc-builder` conflicts
alvarobartt Dec 13, 2024
a4168b6
Add notes on PaliGemma prompt formatting and inference
alvarobartt Dec 15, 2024
980a217
Update `examples/gke/deploy-paligemma-2-with-tgi/README.md`
alvarobartt Dec 15, 2024
36f995b
Upload images for `examples/gke/deploy-paligemma2-with-tgi`
alvarobartt Dec 15, 2024
2f6abe2
Temporarily skip `---` due to `doc-builder` formatting issues
alvarobartt Dec 15, 2024
5703b35
Remove `---` as it's not rendering nicely
alvarobartt Dec 15, 2024
713588a
Add missing image reference
alvarobartt Dec 15, 2024
4663c4e
Update notes on prompt formatting
alvarobartt Dec 16, 2024
6330d3f
Apply suggestions from code review
alvarobartt Dec 18, 2024
94f89cb
Upload missing `model-gating.png` and update `README.md`
alvarobartt Dec 18, 2024
2012fd9
Add `examples/vertex-ai/pipelines/fine-tune-paligemma-2-with-pytorch`
alvarobartt Jan 14, 2025
7804264
Remove `imgs` and upload those to `documentation-images`
alvarobartt Jan 14, 2025
3b1a7f5
Update `examples/vertex-ai/pipelines/fine-tune-paligemma-2-with-pytorch`
alvarobartt Jan 14, 2025
78123cb
Fix `pipeline-notebook.ipynb` formatting
alvarobartt Jan 14, 2025
63b6158
Rename `pipeline-notebook.ipynb` to `vertex-notebook.ipynb`
alvarobartt Jan 14, 2025
859527f
Run `scripts/internal/update_example_tables.py`
alvarobartt Jan 14, 2025
6c99feb
Merge branch 'main' into pali-gemma-2-examples
alvarobartt Jan 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
403 changes: 403 additions & 0 deletions examples/gke/deploy-paligemma-2-with-tgi/README.md

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions examples/gke/deploy-paligemma-2-with-tgi/config/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: tgi
spec:
replicas: 1
selector:
matchLabels:
app: tgi
template:
metadata:
labels:
app: tgi
hf.co/model: google--paligemma2-3b-pt-224
hf.co/task: text-generation
spec:
containers:
- name: tgi
image: "us-central1-docker.pkg.dev/gcp-partnership-412108/deep-learning-images/huggingface-text-generation-inference-gpu.3.0.1"
# image: "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/huggingface-text-generation-inference-cu124.3-0.ubuntu2204.py311"
resources:
requests:
nvidia.com/gpu: 1
limits:
nvidia.com/gpu: 1
env:
- name: MODEL_ID
value: google/paligemma2-3b-pt-224
- name: NUM_SHARD
value: "1"
- name: PORT
value: "8080"
- name: HF_TOKEN
valueFrom:
secretKeyRef:
name: hf-secret
key: hf_token
volumeMounts:
- mountPath: /dev/shm
name: dshm
- mountPath: /tmp
name: tmp
volumes:
- name: dshm
emptyDir:
medium: Memory
sizeLimit: 1Gi
- name: tmp
emptyDir: {}
nodeSelector:
cloud.google.com/gke-accelerator: nvidia-l4
18 changes: 18 additions & 0 deletions examples/gke/deploy-paligemma-2-with-tgi/config/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tgi
# https://cloud.google.com/kubernetes-engine/docs/concepts/ingress
annotations:
kubernetes.io/ingress.class: "gce"
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: tgi
port:
number: 8080
12 changes: 12 additions & 0 deletions examples/gke/deploy-paligemma-2-with-tgi/config/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: tgi
spec:
selector:
app: tgi
type: ClusterIP
ports:
- protocol: TCP
port: 8080
targetPort: 8080
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading